https://kotlinlang.org logo
m

mattinger

07/21/2021, 9:10 PM
Does anyone know if the release version of compose is going to support kotlin 1.5.20? It seems odd that it’s a full release, yet the rc01 of compose chokes if you try to use it:
Copy code
e: This version (1.0.0-rc01) of the Compose Compiler requires Kotlin version 1.5.10 but you appear to be using Kotlin version 1.5.20 which is not known to be compatible.  Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
what’s even odder is that i’m using rc02 of compose and it’s compiler.
👍 1
e

eygraber

07/21/2021, 9:19 PM
I just hope there's a fast follow with 1.5.30 support (whenever that's released). It fixes some pretty gnarly bugs that I've experienced (not compose related).
m

mattinger

07/21/2021, 9:25 PM
I’d settle for it just reporting the error right in the first place. I’m using rc02, yet it’s still reporting it as rc01, probably due to the android gradle plugin being behind.
but i’m explicitly setting the compiler version anyway
Copy code
composeOptions {
        kotlinCompilerExtensionVersion = BuildEnv.composeVersion
    }
and BuildEnv.composeVersion is 1.0.0-rc02
so why is the error even reporting that i’m using rc01?
l

Landry Norris

07/21/2021, 9:47 PM
I see the same issue. Maybe they hardcoded the string in the error message to rc01 and forgot to change it?
m

mattinger

07/21/2021, 9:54 PM
blob shrug
i

itnoles

07/21/2021, 11:46 PM
since Jetpack Compose is actually Kotlin compiler plugins, they made it to ties with specific kotlin versions
m

mattinger

07/22/2021, 1:44 AM
Hopefully that will stabilize at some point and every kotlin update won’t break compose.
j

jim

07/23/2021, 6:54 PM
No, the next release (1.0.0-stable) will be using Kotlin 1.5.10.  We intend to follow up with a Compose 1.0.1 after which supports Kotiln 1.5.21, but I'm not sure how soon after the 1.0.0 that might be (maybe a day or two, maybe a week or two). If you are in a rush to use Compose with Kotlin 1.5.21, you can use the Jetbrains binaries (https://github.com/JetBrains/compose-jb) which include support for Desktop+Web+Android and which should be binary compatible with Compose 1.0.0-stable and work with Kotlin 1.5.21.  The Jetbrains build262 is already released.
m

mattinger

07/26/2021, 6:00 PM
We’re already on kotlin 1.5.20 for our project, so i guess we’ll have to wait for for the follow on to be able to use it.
@jim So if i’m reading the above correctly, there’s no set timeframe (i hope it’s sooner rather than later), but i’m also concerned that we’re going to have a tight coupling between the kotlin version and the compose version that’s going to require updating both at the same time. Seems like this is an artifact of how the compiler plugins are architected?
j

jim

07/26/2021, 6:30 PM
Yup, at least until the compiler plugin api stabilizes, but that probably won't happen for at least another year I would expect.