Support Kotlin 1.9.20
drewhamilton opened this issue · comments
1.9.20-Beta appears to remove the setUseIR
function, so tests crash at runtime.
'void org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments.setUseIR(boolean)'
java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments.setUseIR(boolean)'
at com.tschuchort.compiletesting.KotlinCompilation$commonK2JVMArgs$1.invoke(KotlinCompilation.kt:304)
at com.tschuchort.compiletesting.KotlinCompilation$commonK2JVMArgs$1.invoke(KotlinCompilation.kt:279)
at com.tschuchort.compiletesting.AbstractKotlinCompilation.commonArguments(AbstractKotlinCompilation.kt:172)
at com.tschuchort.compiletesting.KotlinCompilation.commonK2JVMArgs(KotlinCompilation.kt:279)
at com.tschuchort.compiletesting.KotlinCompilation.compileJvmKotlin(KotlinCompilation.kt:452)
at com.tschuchort.compiletesting.KotlinCompilation.compile(KotlinCompilation.kt:628)
at dev.drewhamilton.poko.PokoCompilerPluginTest.compilation of valid class succeeds(PokoCompilerPluginTest.kt:221)
Can you try with this branch? #388
This is likely to tail from branch #388 still:
args.useIR = useIR
![Screenshot 2023-09-26 at 5 57 10 AM](https://private-user-images.githubusercontent.com/182340/270646753-ca713adf-15c5-46b8-a068-c2826ce98d85.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc0NTU0NzAsIm5iZiI6MTcxNzQ1NTE3MCwicGF0aCI6Ii8xODIzNDAvMjcwNjQ2NzUzLWNhNzEzYWRmLTE1YzUtNDZiOC1hMDY4LWMyODI2Y2U5OGQ4NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjAzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYwM1QyMjUyNTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kMDE2MTk2YjVlMjJmZmM3ZTBhOWYzZTYzYTVlMTA0MTNkMjIyYjA5OTlkMGNkY2IxMTQzZGQwYTUxOTM5ZDczJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.61gabLYrTLSB6dPHagD2-G1pLZY8zfEUII_Ifk5TO0M)
I think this is now inferred as the opposite of useOldBackend
in the compiler code.
@martinbonnin Yep, my tests pass if I do an includeBuild
with #388's branch.
Testing of #394 which is a slightly more complete PR would be appreciated too if anyone has the chance.
Yep, confirmed #394's branch works for me too.
Is there any traction in this ticket? My tests are failing on 1.9.20. @tschuchortdev
@krzema12 until support gets added upstream you can use @ZacSweers fork that should have much better support for newer versions of Kotlin: https://github.com/ZacSweers/kotlin-compile-testing
Also running in this issue. It would be nice to get a new release with support for 1.9.20
Also running into this issue! Is there an estimate for when we'll get the new release to support 1.9.20?
Also running into this issue. Would love to see progress here. Any way to help speed this up? (Not sure if I can though)
@krzema12 until support gets added upstream you can use @ZacSweers fork that should have much better support for newer versions of Kotlin: https://github.com/ZacSweers/kotlin-compile-testing
Is it possible to make a Pull Request on this repo or the code base has changed a lot?
I have just made a new release updated for Kotlin v1.9.24 and with a bunch of bug fixes cherrypicked from forks: https://github.com/tschuchortdev/kotlin-compile-testing/releases/tag/1.6.0
As for Kotlin v2.0.0, I've taken a look at it and it seems to be a lot of work with changes in both KAPT and KSP as I can see from the work that Zac Sweers has already done on this. I'll see if I can merge changes from his fork back later so they don't diverge too much. Honestly, you're probably better off using Zac Sweers' fork if you need quick updates. I'm doing Scala work nowadays and don't really use this myself anymore, so my motivation to spend scarce free time on maintenance is dwindling.