Skip to content

Bump build Kotlin version to 2.4.0 - #3107

Open
jaschdoc wants to merge 3 commits into
mainfrom
upgrade-kotlin-2.4.0
Open

Bump build Kotlin version to 2.4.0#3107
jaschdoc wants to merge 3 commits into
mainfrom
upgrade-kotlin-2.4.0

Conversation

@jaschdoc

Copy link
Copy Markdown
Collaborator

Closes #2965

@jaschdoc

jaschdoc commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

@hfmehmed, this PR breaks all integration tests that use Kotlin 2.2.x since the meta data is no longer readable by the 2.2.x Kotlin compiler. Is that acceptable or what are your thoughts on it?

Note that this PR bumps the version of Kotlin used to build KSP to 2.4.0. We have some integration tests that use 2.2.x to build the workload / sample projects in our integration tests. They are now incompatible due to the meta data.

@hfmehmed

hfmehmed commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Acceptable or not that's the policy Jetbrains have i think. The compile binary compatbility rule states that a kotlin compiler of version N can read metadata from compiled libraries up to version N+1. So compiler 2.2.x can ready metadata from 2.3.x at most.

We should drop tests that use 2.2.x and lower in this case i guess. Checkout #3109

@jaschdoc
jaschdoc marked this pull request as ready for review August 3, 2026 12:03
@jaschdoc

jaschdoc commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

I see, thanks! This seems to be another breaking change for 2.2.x users, so is this a good idea to include it now?

@hfmehmed

hfmehmed commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

I think so, the symbol-processing-api jar is too coupled to the version of kotlin we compile things with so stdlib gets bundled in the final JAR which essentially forces anyone using 2.2.x to stick with current version of KSP.

Now that KSP releases are uncoupled from Kotlin we have the problem to keep some support levels (e.g promises to support Kotlin releases at least 1 year old and maybe at most 1.5 years old?). Or we need to find some smart way to be able to compile KSP with newer Kotlin version but still allow users to use old KGP/Kotlin versions but i guess that could lead to tricky classloader situations

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.

Upgrade to Kotlin 2.4.0

2 participants