Looking forward to a Kotlin 1.7.20 compatible Comp...
# compose
l
Looking forward to a Kotlin 1.7.20 compatible Compose Compiler 👀 Anyone knows when we can expect it?
7
3
j
If you suppress the version check, I'd expect the 1.7.20-RC build to be compatible: https://androidx.dev/storage/compose-compiler/repository
Best case scenario, an official/stable build typically takes at least a few days for us to land the changes spin a build and publish it.
l
Why days, when you already have pre-builds on the latest RC?
j
Big companies have processes to make sure the things we deliver are stable and scalable. 🤷
j
That's really not it. They're held back by bespoke infrastructure that they built to manage the self-inflicted AndroidX monorepo.
j
Well, that too.
But some are policies and process. For example, we aren't likely to publish a release on a Friday, because if something goes wrong, no one will be in the office to support it.
l
Looks like JetBrains almost released on a Friday blob upside down
j
😇
l
I also do like to release stuff on Fridays when it's developer things. I actually find it okay because developers that try that new version on a weekend will be more forgiving than their professional, on-the-job equivalent, and that means you have valuable and kind feedback that you can act on right on Monday morning
j
What about JetBrains releasing at same time their artifacts, at least?
I mean, using their Compose Gradle plugin should be compatible with the latest Kotlin version when it is released
l
If I have low confidence, I don't release, and I work through additional testing before releasing. I guess it's something you could start doing on compose compiler, instead of having a lowest common denominator through all AndroidX?
j
But some are policies and process. For example, we aren't likely to publish a release on a Friday, because if something goes wrong, no one will be in the office to support it.
In the meantime... other "part" of Google: https://github.com/google/ksp/releases/tag/1.7.20-1.0.6
e
I tested 1.4.0-dev-k1.7.20-RC-a143c065804 with Kotlin 17.20 and it worked for me
j
@jim I suppresed the check and I am getting
e: java.lang.NoSuchMethodError: 'boolean org.jetbrains.kotlin.backend.common.ir.IrUtilsKt.isFinalClass(org.jetbrains.kotlin.ir.declarations.IrClass)'
I am using the JB Compose Gradle plugin with the version
1.2.0-beta01
j
@Javier Are you using Compose Compiler version 1.4.0-dev-k1.7.20-RC-a143c065804?
j
No, I thought that the latest beta was working with 1.7.20 if I suppress the warning
I am going to check the jetbrains repo
j
j
I am gonna try
1.3.0-alpha01
I need the KMP artifact, not sure if I can use the androidx one
j
The Compose Compiler is a Kotlin Compiler plugin, the Kotlin Compiler is a JVM application. You need a JVM build of the Compose Compiler. That is what Google builds.
j
Oh, looks like they already splitted it too
there is a
1.3.0-alpha01
for the compiler
but gradle plugin is on:
Copy code
1.2.0-beta01/                                                    -         -
1.2.0-beta02-dev795/                                             -         -
1.2.0-beta02-dev798/
@jim is there any sample of configuring a KMP project using the specific compiler version in the setup?
I guess I need to apply the Compose Gradle plugin, and later indicate the compiler version inside somewhere, right?
j
I am 97% sure I've seen people in the #compose-desktop channel doing it, slack search sucks and I'm not finding the posts at the moment.
j
any time I have tried to search something here, I spent a lot of time. I will search anyway
j
You could probably ask in the #compose-desktop channel, there may be someone there who knows off the top of their head, or has a better sense of which keywords to search.
maybe that?
j
Yup, that would do it!
j
Thank you for all the info 🙂
@John O'Reilly are you sharing compose code in a KMP project in Confetti? I can't find it
j
no, not in that project
haven't tried yet for project where there's say both Android and desktop compose
j
@Javier I went ahead and created a sample for you, where I upgraded Compose Desktop template to use the latest Compose Compiler pre-release: https://github.com/jimgoog/ComposeDesktopAppUsingPrereleaseComposeCompiler/commit/9f6df7b3925c95b6ea3505f78a29dc75424576c0
m
Remember at some point, the kotlin compiler api will be stable and all this becomes a distant memory. At least that's my understanding. It's why the compose compiler is so tied to the kotlin version. It's because the compiler plugin api is not yet stable.
So you can blame google all you want (i'm no google apologist), but this one is on Jetbrains to get the compiler api stable, which i'm sure is no simple task.
m
Yeah but the question here is about managing that instability. Given there is always a public RC beforehand, and even more that can be shared though internal collaboration, it should be theoretically possible to deliver new Compose compiler (now as detached module) versions much quicker, and that is practically shown above with the example of KSP, which also uses the compiler API, yet was shipped on day one of 1.7.20.
l
Today, I wanted to try 1.8.20 Beta/RC, I jumped on the link you provided @jim to add the repository and see which versions refreshVersions would find, but apparently, this is a fake Maven repo that doesn't contain the conventional
maven-metadata.xml
file 🫠. I tried to understand what's shown here https://androidx.dev/storage/compose-compiler/repository, but no repo seems to be listed. Navigated in the website menu, and on the home page (https://androidx.dev/), I'm seeing that every build has its own separate repo? Why so much hassle? Isn't the Kotlin team mad about how they get much fewer EAP users because of how much Compose is adopted and how it's getting in the way? Personnally, I'm very sad that I can't test EAP Kotlin on my main projects, and that I had to spend time to realize there's no practical way to find out if/when Compose unblocks that possible. I'm asking again, please, do it like KSP does, on a public repo, like Kotlin beta and rc releases are on MavenCentral. 🙏🏼