👋 I'm currently testing out Kotlin 1.8 in Anvil and running into test failures due to an API that was removed but is currently used by kotlin-compile-testing. Are there any plans to add support / a new release for this soon?
Additional details:
The API removal was for singleModule in K2JVMCompilerArguments as part of this commit. This API is accessed in KotlinCompilation line 359 currently which gets executed for nearly all Anvil compiler tests. When this happens, the following error is produced:
'void org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments.setSingleModule(boolean)'
java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments.setSingleModule(boolean)'
at com.tschuchort.compiletesting.KotlinCompilation$commonK2JVMArgs$1.invoke(KotlinCompilation.kt:359)
at com.tschuchort.compiletesting.KotlinCompilation$commonK2JVMArgs$1.invoke(KotlinCompilation.kt:300)
at com.tschuchort.compiletesting.AbstractKotlinCompilation.commonArguments(AbstractKotlinCompilation.kt:133)
at com.tschuchort.compiletesting.KotlinCompilation.commonK2JVMArgs(KotlinCompilation.kt:300)
at com.tschuchort.compiletesting.KotlinCompilation.stubsAndApt(KotlinCompilation.kt:472)
at com.tschuchort.compiletesting.KotlinCompilation.compile(KotlinCompilation.kt:655)
at com.squareup.anvil.compiler.internal.testing.AnvilCompilation.compile(AnvilCompilation.kt:186)
at com.squareup.anvil.compiler.internal.testing.AnvilCompilation.compile$default(AnvilCompilation.kt:174)
at com.squareup.anvil.compiler.internal.testing.AnvilCompilationKt.compileAnvil(AnvilCompilation.kt:249)
at com.squareup.anvil.compiler.internal.testing.AnvilCompilationKt.compileAnvil$default(AnvilCompilation.kt:211)
at com.squareup.anvil.compiler.dagger.ProvidesMethodFactoryGeneratorTest.compile(ProvidesMethodFactoryGeneratorTest.kt:3476)
at com.squareup.anvil.compiler.dagger.ProvidesMethodFactoryGeneratorTest.compile$default(ProvidesMethodFactoryGeneratorTest.kt:3471)
at com.squareup.anvil.compiler.dagger.ProvidesMethodFactoryGeneratorTest.a factory class is generated for an internal provider method with a mangled name in a companion object(ProvidesMethodFactoryGeneratorTest.kt:834)
...
If you need an example for testing, you can pull down Anvil, checkout branch joel.test-kotlin-1-8, and then run
./gradlew :compiler:test --no-build-cache --no-daemon -Psquare.kotlinVersion=1.8.0-RC-268
👋 I'm currently testing out Kotlin 1.8 in Anvil and running into test failures due to an API that was removed but is currently used by kotlin-compile-testing. Are there any plans to add support / a new release for this soon?
Additional details: The API removal was for
singleModule
inK2JVMCompilerArguments
as part of this commit. This API is accessed inKotlinCompilation
line 359 currently which gets executed for nearly all Anvil compiler tests. When this happens, the following error is produced:If you need an example for testing, you can pull down Anvil, checkout branch joel.test-kotlin-1-8, and then run
./gradlew :compiler:test --no-build-cache --no-daemon -Psquare.kotlinVersion=1.8.0-RC-268