Which version of Kotlin is using the IntelliJ buil...
# k2-adopters
j
Which version of Kotlin is using the IntelliJ build #IU-241.14494.240? Is it planned to release one with the Kotlin version 2.0.0-RC1 soon?
m
Hi! The Kotlin plugins that support 2.0.0-RC1 are bundled in the latest IntelliJ IDEA, you can read it in What's new page: https://kotlinlang.org/docs/whatsnew-eap.html#ide-support
j
I think that is not possible, RC1 was released later and I am facing a breaking change in the FIR API
FirSupertypeGenerationExtension
m
cc @Ilya Kirillov [JB]
j
Just to add more info, I compiled intellij sources and my compiler plugin using 2.0.0-RC1 is working with it (yesterday at night)
i
Hey! We don't bundle a release Kotlin compiler into IntelliJ IDEA. Instead, we use a separate branch to stabilize the Kotlin compiler which we use as an analyzer. For the IJ build
IU-241.14494.240
, the branch used to build the Kotlin compiler for bundling into IJ is https://github.com/JetBrains/kotlin/tree/kt-241.14494
j
Yep, the branch is outdated compared to the 2.0.0-RC1, https://github.com/JetBrains/kotlin/blob/kt-241.14494/compiler/fir/resolve/src/org[…]brains/kotlin/fir/extensions/FirSupertypeGenerationExtension.kt
Copy code
context(TypeResolveServiceContainer)
    @Suppress("IncorrectFormatting") // KTIJ-22227
    abstract fun computeAdditionalSupertypes(
        classLikeDeclaration: FirClassLikeDeclaration,
        resolvedSupertypes: List<FirResolvedTypeRef>
    ): List<FirResolvedTypeRef>
`````` Any chance the next IDEA EAP would include the new signature without context receivers?
r
AFAIU the next IDEA EAP (2024.2) will include the analyzer which already contains those changes However, from the IDEA release schedule, I see that the next IDEA EAP release is going to happen only in May at best, so it will take some time to get those changes We can probably try to cherry-pick those particular breaking changes to the release branches, but I am not sure if it will solve all the problems cc @dmitriy.novozhilov @Ilya Kirillov [JB] WDYT?
d
Those changes are present in Kotlin release branch (2.0.0) but missing from branch with kotlin bundled in 241 idea plugin So it's up to IDE team to decide
👍 1
j
My plan is to open source the Kopy plugin when people can start to use it easily without compiling the IDE from sources. I am not hurry so I can wait until May. If you see it can help finding some issue in K2 then it would be nice to get it earlier.
👍 1