tschuchortdev / kotlin-compile-testing

A library for testing Kotlin and Java annotation processors, compiler plugins and code generation
Mozilla Public License 2.0
658 stars 63 forks source link

Fails on Kotlin 1.7.0-RC #268

Closed drewhamilton closed 2 years ago

drewhamilton commented 2 years ago

When bumping my compiler plugin to Kotlin 1.7.0-RC, tests fail with a NoSuchMethodError:

'void org.jetbrains.kotlin.cli.common.arguments.ParseCommandLineArgumentsKt.parseCommandLineArguments(java.util.List, org.jetbrains.kotlin.cli.common.arguments.CommonToolArguments)'
java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.cli.common.arguments.ParseCommandLineArgumentsKt.parseCommandLineArguments(java.util.List, org.jetbrains.kotlin.cli.common.arguments.CommonToolArguments)'
    at com.tschuchort.compiletesting.AbstractKotlinCompilation.commonArguments(AbstractKotlinCompilation.kt:157)
    at com.tschuchort.compiletesting.KotlinCompilation.commonK2JVMArgs(KotlinCompilation.kt:300)
    at com.tschuchort.compiletesting.KotlinCompilation.compileJvmKotlin(KotlinCompilation.kt:488)
    at com.tschuchort.compiletesting.KotlinCompilation.compile(KotlinCompilation.kt:664)

At a glance it looks like a third default argument was added to parseCommandLineArguments.

tschuchortdev commented 2 years ago

Can you try with the latest snapshot version? I just upgraded KSP and Kotlin to 1.7.0-RC on master.

drewhamilton commented 2 years ago

It works, thanks!