kotlin-inject
kotlin-inject copied to clipboard
Update Kotlin, KSP, KotlinPoet, and Gradle
I should document this somewhere, but plan to be somewhat conservative on kotlin/ksp updates as the user can update them themselves. Not against updating, but it just needs to be for something we need instead of bumping arbitrarily.
Looks like kotlinpoet: 1.10.2 didn't have a kotlin version bump so that should be safe to do.
I'd say that it might be worth it to keep up to date so that if there is a breaking change that requires a library update it'll be closer to that version. But there's no guarantee on that so ¯_(ツ)_/¯
For the libs we are using those should be few and far between
@evant I'll be keeping this updated until it is time to merge :smile:
@evant I updated to Gradle 8.2.1 and Kotlin 1.9
This will probably help with bridging the gap towards Kotlin 2.0
Any idea why the linux build is failing? Does it need more memory?
Fyi I was testing this locally and was running into issues with the kapt backend. After a bunch of debugging turns out it's running with the embeded gradle kotlin instead of the kotlin version you pull in. This means it was using kotlin 1.8.10 and kotlinx-metadata 0.5.0 which won't work with kotlin 1.9.0.
I think I'm just going to go ahead of get rid of the kapt backend, it's deprecated anyway. Was planning on doing a bugfix release before then but it's getting more and more of a pain to deal with ☹️.
Are the kapt tests not run on CI? I didn't notice that they were failing locally.
I pushed a new commit addressing your comments.
I didn't notice that they were failing locally.
Hm, I wonder if it has something to do with the toolchain support. I'm running with java 20 so it's jumping to java 17. When I run with
JAVA_HOME=/usr/lib/jvm/java-17-openjdk ./gradlew test
it works fine.
Ok yeah it does have to do with toolchains. If I remove the toolchain lines and add back setting the source compatibility it works fine. I do wonder if the toolchian thing is worth it? In theory forcing a specific version of javac is good for consistency but running newer versions seems to work fine without it?
TIL that toolchains aren't as good as I thought they were 😅
https://kotlinlang.slack.com/archives/C3PQML5NU/p1689790193010619?thread_ts=1689789822.225749&cid=C3PQML5NU
I pushed an update cleaning up some of the source and target usage, and removed the toolchains. Could possibly add the toolchain back conditionally in the future to aid in having a minimum required version of java.
The kapt failure when using java 20 with the toolchain set is odd; I filed KT-60563 with JetBrains.