Closed ZacSweers closed 1 month ago
No as there are no API changes I've seen. Do you need one?
I think so, I get this error when using Kotlin 2.0.20-Beta2 (or 1) with a compiler plugin compiled with Kotlin 2.0.0 and using IrFactory
:
java.lang.NoClassDefFoundError: org/jetbrains/kotlin/ir/declarations/IrFactory$DefaultImpls
caused by this line: https://github.com/hfhbd/validation/blob/9683018d1c39a2dd264a3474bdcc68573d4ae659/kotlin-plugin/src/main/kotlin/app/softwork/validation/plugin/kotlin/ValidationTransformer.kt#L39
This library doesn't implement any IR plugins of its own. That's an issue you have to fix on your side
Yes I know, but there was an incompatible change (change of IrFactory from interface to open class) in the kotlin compiler so using the IrFactory compiled with 2.0.20-Beta2 throws a NoClassDefFoundError when using compiler testing using 2.0.0 because the default parameter class generated for the interface does not exist anymore.
That class isn't implemented in this library, I'm really not following. Please be more specific (full trace pointing to where this library is responsible for providing that API). It sounds like you should just be forcing a newer version of the underlying compiler dependency.
It sounds like you should just be forcing a newer version of the underlying compiler dependency.
I didn't know this is possible, but yes I agree, sounds like the solution I am missing. Do you have any sample to override the Kotlin compiler dependency?
It's a gradle dependency like any other. You can see its declaration here: https://github.com/ZacSweers/kotlin-compile-testing/blob/main/core/build.gradle.kts#L34
Thanks for your help, it does work, nice!
Do you have any snapshot releases with 2.0.20-Beta2 support?