-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with Kotlin 2.x #618
Comments
BTW, I'm using Kotlin 1.9.22 now and it's working correctly |
Thanks for logging the issue and posting the workaround! As also indicated via Slack definitely something to look into, with help appreciated. I imagine we'll want to support both K1 and K2, so that's be interesting. |
I'm running into similar issues when using Kotlin 1.9.24 - unfortunately, it's not realistic to couple the repo's Kotlin version to the one that openrewrite-kotlin is using. I think that, probably, openrewrite-kotlin could shade its version of the embeddable Kotlin compiler, so that it can use a different one to parse Kotlin code than the one that is used when building. The concrete issue I'm seeing is
|
Thanks for the report @pettermahlen ; Surprised to see that's even an issue with the v1.9.22 we're using: rewrite-kotlin/build.gradle.kts Line 16 in 16e576e
Feel free to bump that up to 1.9.24 if that helps you there already; then we can tackle the v2 migration later. |
The main point I was trying to make is that it's not ideal for rewrite-kotlin to require users to use a specific version of Kotlin when building their source. Instead, since rewrite-kotlin uses internal APIs that change even with minor bumps, it should be shading those. That way, openrewrite-kotlin's upgrades of the compiler APIs it's using for parsing, and each of the projects upgrades of the version used to build with can be kept separate. It seems like it would be very awkward if the latest version of kotlin-rewrite always only worked with the latest version of Kotlin. |
Oh that I fully understand and agree with; my expectation though is that the 1.9 branch will not evolve much anymore, so for now ensuring we are compatible with the now-latest v1.9.25 would mean at least folks on 1.9 can continue to use rewrite-kotlin. v2 would be a larger effort which we can then tackle separately. |
hei team
I'm trying to use
rewriteRun
https://github.com/Hyunk3l/ecommerce in this public project I've (kotlin 2.1, java 17, etc.)I'm trying with this recipe and this is the error I get
I suspect it's because of Kotlin 2.1.. so I downgraded it to 2.0.20 but
Slack Message
The text was updated successfully, but these errors were encountered: