Hi. Simple question for clarify. When should I us...
# compiler
a
Hi. Simple question for clarify. When should I use kotlin-compiler-embeddable and when kotlin-compiler to develop 3p plugins? Now i am using kotlin-compiler-embeddable, but i have found that some open source plugins use kotlin-compiler instead. Is there difference between dependencies for frontend and backend plugins?
I have found https://kotlinlang.slack.com/archives/C7L3JB43G/p1665397198063129?thread_ts=1665238535.993019&cid=C7L3JB43G But i see that other plugins (for example Compose Compiler) depend on kotlin-compiler. So has anything changed since linked message? @dmitriy.novozhilov, could you explain please? Sorry for ping, but i feel i am missing something important
d
Can't tell for Compose, but for JetBrains plugin we depend on unshaded (not embeddable) compiler and then produce additional shaded artifact as an additional step (which is later used by gradle, when user enables some compiler plugin) So you can 1. do the same thing 2. depend only on
kotlin-compiler-embeddable
a
Thanks! I found that Compose compiler do same thing, but there are so many plugins that doesnt. Anyway now i know right way. But a new question has appeared: Is there any case to use backend compiler plugins in idea plugin? I found compose-idea-plugin in jetbrains github repo which runs compiler to check compose version. Maybe that code outdated, but anyway can i use backend compiler plugin in idea for more complex things? Could you give some examples?
d
Unfortunately yes IDE plugin uses backend for
Show bytecode view
action and for evaluating expressions in the debugger
a
Ok, i got that is not recomended way) Thanks for answers