You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm writing a small bazel rule to run the kotlin compiler on some targets and I was trying to get the compiler command down to get the code to properly compile.
To Reproduce
I have the following code in my src/main/kotlin/common/test.kt:
packagecommonimportarrow.Optics
@Optics
data classPerson(valname:String, valaddress:Address) { companionobject }
@Optics
data classAddress(valstreet:String) { companionobject }
funmain() {
val person =Person("Jarle", Address("Veien 1"))
val streetLens =Person.address.street
val upperCase = streetLens.modify(person, String::toUpperCase)
println("HELLO, WEARY TRAVELLER!")
}
logging: using Kotlin home directory /nix/store/cqx94xvmqan7kmbwap5xzxbadqmscfp7-kotlin-1.5.21
logging: using JVM IR backend
logging: configuring the compilation environment
exception: java.lang.IllegalStateException: The provided plugin arrow.meta.OpticsMetaPlugin is not compatible with this version of compiler
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerExtensionsFromPlugins$cli(KotlinCoreEnvironment.kt:617)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.registerExtensionsFromPlugins(KotlinCoreEnvironment.kt:130)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:170)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:431)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.createCoreEnvironment(K2JVMCompiler.kt:226)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:152)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:90)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:76)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:45)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:227)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit$default(CLITool.kt:222)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:214)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:271)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.jetbrains.kotlin.preloading.Preloader.run(Preloader.java:87)
at org.jetbrains.kotlin.preloading.Preloader.main(Preloader.java:44)
Caused by: java.lang.AbstractMethodError: Receiver class arrow.meta.OpticsMetaPlugin does not define or inherit an implementation of the resolved method 'abstract void registerProjectComponents(com.intellij.mock.MockProject, org.jetbrains.kotlin.config.CompilerConfiguration)' of interface org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar.
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerExtensionsFromPlugins$cli(KotlinCoreEnvironment.kt:609)
... 23 more
I suspect I messed up either the classpath or there's some option missing to properly link arrow-optics-plugin to arrow-meta
Expected behavior
The code to compile normally.
Screenshots
Not applicable.
Environment (please complete the following information):
Describe the bug
I'm writing a small bazel rule to run the kotlin compiler on some targets and I was trying to get the compiler command down to get the code to properly compile.
To Reproduce
I have the following code in my
src/main/kotlin/common/test.kt
:Running the following command:
Results in:
I suspect I messed up either the classpath or there's some option missing to properly link arrow-optics-plugin to arrow-meta
Expected behavior
The code to compile normally.
Screenshots
Not applicable.
Environment (please complete the following information):
Additional context
I'm not running this from my bazel rule just yet, I'm running this directly from the command line for the time being.
The text was updated successfully, but these errors were encountered: