Skip to content

Test Kotlin 2.4.0-Beta1 in CI#47

Draft
vRallev wants to merge 2 commits intomainfrom
ralf/beta
Draft

Test Kotlin 2.4.0-Beta1 in CI#47
vRallev wants to merge 2 commits intomainfrom
ralf/beta

Conversation

@vRallev
Copy link
Copy Markdown
Collaborator

@vRallev vRallev commented Mar 31, 2026

No description provided.

vRallev added 2 commits March 31, 2026 14:24
Fixed without a :compiler source split. The Kotlin 2.4.0-Beta1 breakage was in plugin registration and test wiring, not in version-specific compiler APIs.

- In compiler/build.gradle I removed the autoservice compiler plugin, made -Xcontext-parameters conditional for pre-2.4 only, and replaced generated registrations with static ServiceLoader files under compiler/src/main/resources/META-INF/services. That avoids the FIR registrar ClassCastException on 2.4.
- I added Metro version alias wiring in integration-tests/app/build.gradle, integration-tests/demo/build.gradle, integration-tests/lib/build.gradle, and stubs/build.gradle, mapping 2.4.0-Beta1 to Metro's supported 2.4.0-dev-2124.
- I applied the same alias in the compiler test harness at compiler/src/test/kotlin/com/squareup/metro/extensions/services/ExtensionRegistrarConfigurator.kt, which fixes the remaining :compiler:test failures.

Verification: ./gradlew test --quiet and ./gradlew test --quiet -P kotlin.version=2.4.0-Beta1 both pass.

Metro 0.12.1 still emits its upstream unrecognized Kotlin version warning for 2.4.0-Beta1, but the build and test suite are green with the alias in place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant