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
tschuchort
02/06/2020, 1:25 PM
Are you extending the same
ComponentRegistrar
?
r
Rohan Maity
02/06/2020, 3:54 PM
My plugin is using
Kotlin-compiler-embeddable
, and project is using
Kotlin-compiler
Rohan Maity
02/06/2020, 3:56 PM
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)