:wave: I've been testing some of the new incremen...
# compiler
z
👋 I've been testing some of the new incremental common compilation props and found a bug in 2.4.20 that's fixed (I think incidentally) in 2.5.0-Beta1 I think that's from one or both of these - github.com/JetBrains/kotlin/commit/… (hash source file paths for JVM metadata fragment names) - github.com/JetBrains/kotlin/commit/… (drop the disk-based common metadata KLIB writing) Would it be worth filing a FR to backport those to 2.4.21? Creating the parent directory in writeTo might be enough there, but y'all would know better
Context: Metro's contribution hints are FIR-generated top-level declarations, so under KT-75864 every contributing file is always dirty. In KMP projects with contributions in commonMain, that makes every JVM incremental build a full rebuild (KT-62686), even for jvmMain-only edits. On 2.5.0-Beta1 the common-sources flag fixes that for us, and a backport would let 2.4.x users opt in a bit earlier
The crash I ran into trying it
Copy code
e: java.nio.file.NoSuchFileException: .../build/kotlin/compileKotlinJvm/cacheable/metadata-jvm/commonMain/default/linkdata/package_metro.hints/metro/hints/testCommonValueDev_zacsweers_metro_AppScope.kt.knm
      at org.jetbrains.kotlin.cli.pipeline.jvm.metadata.JvmMetadataComponentWriter.writeTo(JvmMetadataComponentWriter.kt:38)
The synthetic file's name includes its package path (metro/hints/...kt) and
JvmMetadataComponentWriter
only creates the package fragment directory, so the nested parent directory doesn't exist
p
What's your exact setup? As far I remember IC shouldn't be enabled in multiplatform projects at all in 2.4.20, unless you opt-in with some very scary flag.
Or, that's exactly the problem, as it not enabled, but tries to do something and it crashes?
z
I am trying the scary flags yes 🙂