Kotlin-compiler-embeddable vs kotlin-compiler

Hey Dmitry,

I’ve been working on Kotlin support for Bazel, one thing I’ve noticed is that:

1P Jetbrains compiler plugins are built against kotlin/compiler/plugin-api at master · JetBrains/kotlin · GitHub which includes in the method signature for ComponentRegistrar. registerProjectComponents(com.intellij.mock.MockProject, CompilerConfiguration): kotlin/ComponentRegistrar.kt at 2f835ed66f0583cbcf92f05fd8842910f5d56f10 · JetBrains/kotlin · GitHub

3P plugins tend to be built against kotlin-compiler-embeddable which includes in the method signature org.jetbrains.kotlin.com.intellij.mock.MockProject instead.

Bazel Kotlin rules use kotlin-compiler which works fine for 1P plugins, but 3P plugins fails with an AbstractMethodError because the signature doesn’t match for ComponentRegistrar. registerProjectComponents(MockProject, CompilerConfiguration).

I’m guessing the right thing to do is to have the Kotlin rules use compiler-plugin-embeddable here?