I'm currently fixing up the kotlin bazel integrati...
# compiler
c
I'm currently fixing up the kotlin bazel integration -- is there a way to exit the compiler after the analysis phase? I'm attempting to the use the kotlin jvm-abi-plugin to generate abis for downstream compilation.
r
Someone may know more about this but thought I’d share my experience so far… You can return a different value in
org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension#analysisCompleted
before it goes into codegen to avoid codegeneration if you are using a compiler plugin that interfaces with the different compiler phases but I’m not sure if there is a flag for it to just ask the compiler to disable codegen. The Kotlin IDEA plugin uses a loop on analisys and only codegens when you do a full compile but for that analisys loop they instantiate that part of the compiler API manually
c
thanks -- I was just looking into the analysisResult. I'm surprised the jvm-abi-gen plugin doesn't have an option for that.
I'll take a look at the IDEA plugin to see what it does -- sounds like it might be a good place to look at for abi generation.
t
The KAPT plugin does exactly what Raul suggested, you could look at that.
c
Yeah -- it's a pretty simple plugin to write. Was hoping that I wouldn't need to go that route. Thanks for the pointers.