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

Runtime error with Kotlin 1.7.0 #280

Closed bnorm closed 2 years ago

bnorm commented 2 years ago

I think a top level function moved in the Kotlin compiler since I'm now getting the following error when compiling and testing with Kotlin 1.7.0. All I had to do was bump the Kotlin version in kotlin-compile-testing in a composite build and it worked again.

'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 com.bnorm.power.CompilerKt.compile(compiler.kt:51)
    at com.bnorm.power.CompilerKt.executeAssertion(compiler.kt:58)
    at com.bnorm.power.CompilerKt.executeAssertion$default(compiler.kt:54)
    at com.bnorm.power.CompilerKt.executeMainAssertion(compiler.kt:78)
    at com.bnorm.power.ArithmeticExpressionTest.assertion with inline addition(ArithmeticExpressionTest.kt:25)
        ...
tschuchortdev commented 2 years ago

What KCT version are you using?

bnorm commented 2 years ago

Failed with what I believe is the latest, 1.4.8.

ZacSweers commented 2 years ago

there is a 1.4.9-alpha but it is built against a snapshot artifact and quite unsafe to use #274

drewhamilton commented 2 years ago

The current 1.4.9-SNAPSHOT is built against 1.7.0-RC and is working with 1.7.0 for me.

A Maven Central release against 1.7.0 would be great though!

bnorm commented 2 years ago

Resolved in version 1.4.9 so closing.