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
raulraja
02/18/2020, 6:05 PM
Someone may know more about this but thought I’d share my experience so far…
You can return a different value in
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
Corbin McNeely-Smith
02/18/2020, 6:06 PM
thanks -- I was just looking into the analysisResult. I'm surprised the jvm-abi-gen plugin doesn't have an option for that.
Corbin McNeely-Smith
02/18/2020, 6:07 PM
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
tschuchort
02/18/2020, 6:47 PM
The KAPT plugin does exactly what Raul suggested, you could look at that.
c
Corbin McNeely-Smith
02/18/2020, 9:33 PM
Yeah -- it's a pretty simple plugin to write. Was hoping that I wouldn't need to go that route.
Thanks for the pointers.