Align ASM and Kotlin stdlib versions across modules#7474
Merged
knutwannheden merged 2 commits intomainfrom Apr 27, 2026
Merged
Conversation
1 task
The classpath partition cache (~/.rewrite/classpath/.partitions) keys by exact GAV, so each distinct resolved version of an artifact produces its own partition file. Two sources of accidental version drift across the multi-module build were each producing duplicate partitions: - ASM: gizmo (in rewrite-core) pins asm-util/-tree/-analysis to 9.3 transitively. rewrite-java requests asm/asm-util at latest.release as `implementation`, but that does not propagate to project consumers, so modules consuming :rewrite-java (rewrite-java-21/-25, rewrite-yaml/json/ etc.) keep the 9.3 transitive while still bumping `asm` itself to 9.9.1. Declaring all four asm artifacts at latest.release in rewrite-core (where gizmo lives) lets conflict resolution bump them in lockstep everywhere. - Kotlin stdlib: rewrite-kotlin's clikt 3.5.0, rewrite-gradle's mockwebserver 4.x, and rewrite-maven's maven-resolver each drag the deprecated kotlin-stdlib-jdk7/-jdk8/-common artifacts in at older versions (1.6.20 / 1.9.10 / 1.8.21) that the main kotlin-stdlib does not align. Applying kotlin-bom as a test platform constrains the whole family to a single Kotlin version per module.
af3c51a to
bcef3ec
Compare
…lasspath-partitions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The classpath partition cache at
~/.rewrite/classpath/.partitions/keys by exact GAV, so each distinct resolved version of an artifact produces its own partition file even when the underlying types are nearly identical. Surveying the cache showed several artifacts with multiple resolved versions purely from accidental drift in this multi-module build (no intentional cross-version testing). Two patterns drove most of the drift:ASM artifacts split between 9.3 and 9.9.1.
io.quarkus.gizmo:gizmo:1.0.11.Final(declared inrewrite-core) pinsasm-util/asm-tree/asm-analysisto 9.3.rewrite-javarequestsasmandasm-utilatlatest.release, but as animplementationdependency that does not propagate to project consumers. The result::rewrite-java-21:runtimeClasspathand:rewrite-java-25:runtimeClasspath(and most non-Java modules) holdasm:9.9.1together withasm-util/-tree/-analysis:9.3— an inconsistent ASM stack and an extra set of cache partitions for every artifact.Kotlin stdlib family fragmented.
rewrite-kotlindeliberately uses Kotlin 2.3.20, butclikt:3.5.0dragskotlin-stdlib-jdk7/-jdk8/-commonback to 1.6.20. Inrewrite-gradle,mockwebserver:4.+pulls those same artifacts at 1.9.10. Inrewrite-maven, transitives bring 1.8.21 / 1.9.25. The deprecated-jdk7/-jdk8artifacts are not aligned tokotlin-stdlib, so each module ends up with a different Kotlin minor version mix and another batch of partitions.Verified with
dependencyInsightbefore and after the changes.Summary
asm,asm-util,asm-tree, andasm-analysisatlatest.releaseinrewrite-core(alongside the gizmo dependency that pins them). Conflict resolution then bumps all four artifacts in lockstep across every module that depends onrewrite-core.org.jetbrains.kotlin:kotlin-bomas atestImplementationplatform dependency inrewrite-kotlin,rewrite-gradle, andrewrite-maven. The BOM constrains the wholekotlin-stdlib-*family to a single Kotlin version per test classpath.Test plan
./gradlew :rewrite-java-21:dependencyInsight --dependency org.ow2.asm:asm-util --configuration runtimeClasspathresolves to 9.9.1 (was 9.3)../gradlew :rewrite-kotlin:dependencyInsight --dependency org.jetbrains.kotlin:kotlin-stdlib-jdk7 --configuration testRuntimeClasspathresolves to 2.3.20 by BOM constraint (was 1.6.20).:rewrite-gradle(was 1.9.10) and:rewrite-maven(was 1.8.21) — both now 2.3.20../gradlew :rewrite-core:test :rewrite-kotlin:test :rewrite-gradle:test :rewrite-maven:test—BUILD SUCCESSFUL.