My compiler plugin Component registrar is not bein...
# compiler
r
My compiler plugin Component registrar is not being accepted by K2JVMCompiler()
Copy code
java.lang.RuntimeException: Compilation failed. java.lang.ClassCastException: Cannot cast io.quarkus.allopen.cli.QuarkusComponentRegistrar to org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
How could I make it work ?
t
Are you extending the same
ComponentRegistrar
?
r
My plugin is using
Kotlin-compiler-embeddable
, and project is using
Kotlin-compiler
But when I use
kotlin-compiler
in my plugin , it fails and throws this exception
Copy code
Caused by: java.lang.AbstractMethodError: Receiver class io.quarkus.allopen.cli.QuarkusComponentRegistrar does not define or inherit an implementation of the resolved method 'abstract void registerProjectComponents(<http://org.jetbrains.kotlin.com|org.jetbrains.kotlin.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:625)
t
Is it the same version of the dependency?