Upgrade rewrite-kotlin to Kotlin 2 compiler (K2)#6766
Merged
jkschneider merged 2 commits intomainfrom Feb 18, 2026
Merged
Conversation
Kotlin 1 is EOL and doesn't work on Java 25 runtimes. This upgrades kotlin-compiler-embeddable from 1.9.25 to 2.2.0, migrating all K2 FIR API changes in-place without requiring a separate module. Co-Authored-By: Marius Barbulescu <marius.barbulescu@gmail.com>
Member
|
Looks like we've arrived at some of the same changes as seen in Noting that here to double check and close that PR as well once this is merged. |
…flow - Add jakarta.persistence-api as testRuntimeOnly dep in rewrite-java-test so KotlinParser.classpathFromResources can find the full jar (K2 can't use .tt stubs) - Convert KotlinPrinter.visitBinary to iterative left-chain traversal to avoid StackOverflowError on deeply nested binary expressions (2000+ levels)
732b060 to
04458f5
Compare
This was referenced Feb 18, 2026
Closed
|
finally! I cannot wait to use it. |
This was referenced Feb 19, 2026
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.
Summary
Upgrades
kotlin-compiler-embeddablefrom 1.9.25 to 2.2.0 (Kotlin 1 is EOL and incompatible with Java 25)Migrates all K2 FIR API changes in-place: session creation via
JvmFrontendPipelinePhase, type ref/expression renames,FirResolvedArgumentList.mappingfor correct argument-to-parameter resolutionOverrides
classpathFromResourcesinKotlinParser.Builderto resolve full JARs instead of.ttstubs (K2's FIR compiler cannot read type-transformed class files)Supersedes Add support for Kotlin 2.x #5575 and Kotlin 2 #5963.
Co-authored-by: Marius Barbulescu marius.barbulescu@gmail.com