kotlin-inject icon indicating copy to clipboard operation
kotlin-inject copied to clipboard

Update Kotlin, KSP, KotlinPoet, and Gradle

Open eygraber opened this issue 3 years ago • 4 comments

eygraber avatar May 03 '22 06:05 eygraber

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.

evant avatar May 03 '22 18:05 evant

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 ¯_(ツ)_/¯

eygraber avatar May 03 '22 18:05 eygraber

For the libs we are using those should be few and far between

evant avatar May 03 '22 19:05 evant

@evant I'll be keeping this updated until it is time to merge :smile:

eygraber avatar Jul 05 '22 21:07 eygraber

@evant I updated to Gradle 8.2.1 and Kotlin 1.9

This will probably help with bridging the gap towards Kotlin 2.0

eygraber avatar Jul 12 '23 02:07 eygraber

Any idea why the linux build is failing? Does it need more memory?

eygraber avatar Jul 12 '23 03:07 eygraber

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 ☹️.

evant avatar Jul 18 '23 21:07 evant

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.

eygraber avatar Jul 18 '23 22:07 eygraber

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?

evant avatar Jul 20 '23 01:07 evant

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

eygraber avatar Jul 20 '23 02:07 eygraber

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.

eygraber avatar Jul 20 '23 03:07 eygraber