kotlin-compile-testing icon indicating copy to clipboard operation
kotlin-compile-testing copied to clipboard

Support Kotlin 1.9.20

Open drewhamilton opened this issue 2 years ago • 10 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)

drewhamilton avatar Sep 12 '23 15:09 drewhamilton

Can you try with this branch? https://github.com/tschuchortdev/kotlin-compile-testing/pull/388

martinbonnin avatar Sep 26 '23 09:09 martinbonnin

This is likely to tail from branch #388 still:

args.useIR = useIR
Screenshot 2023-09-26 at 5 57 10 AM

I think this is now inferred as the opposite of useOldBackend in the compiler code.

apatrida avatar Sep 26 '23 11:09 apatrida

@martinbonnin Yep, my tests pass if I do an includeBuild with #388's branch.

drewhamilton avatar Sep 29 '23 18:09 drewhamilton

Testing of #394 which is a slightly more complete PR would be appreciated too if anyone has the chance.

3flex avatar Oct 08 '23 11:10 3flex

Yep, confirmed #394's branch works for me too.

drewhamilton avatar Oct 12 '23 03:10 drewhamilton

Is there any traction in this ticket? My tests are failing on 1.9.20. @tschuchortdev

krzema12 avatar Nov 05 '23 21:11 krzema12

@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

martinbonnin avatar Nov 05 '23 21:11 martinbonnin

Also running in this issue. It would be nice to get a new release with support for 1.9.20

ftomassetti avatar Dec 16 '23 13:12 ftomassetti

Also running into this issue! Is there an estimate for when we'll get the new release to support 1.9.20?

wangk5 avatar Jan 03 '24 20:01 wangk5

Also running into this issue. Would love to see progress here. Any way to help speed this up? (Not sure if I can though)

NinjaCookie84 avatar Jan 24 '24 12:01 NinjaCookie84

@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?

frecco75 avatar May 21 '24 18:05 frecco75

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.

tschuchortdev avatar May 26 '24 16:05 tschuchortdev