Hello guys :wave: I’m starting to dig into compil...
# compiler
Hello guys 👋 I’m starting to dig into compiler plugins and wonder if there is some documentation about the compiler plugin api? I tried a quick search in google but haven’t found anything similar to docs. Does it exist? Thanks!
No, doesn't exist :) and wont exist before compiler plugins are official api, which they arent yet. There are some Tutorials and example projects, and of course arrow meta
There is no official documentation. Maybe my Hello World Compiler Plugin https://github.com/Foso/KotlinCompilerPluginExample is helpful. And i wrote an instruction for an other project some time ago https://github.com/Foso/MpApt/wiki
Oh, thanks. I thought those APIs are official since I think I’ve seen something on the internet. So, compose team creating compose compiler plugin kinda blindly?
In Corporation with jetbrains, probably helping them designing and stabilizing the future public api :) There's a project by google and arrow meta that wrap the unstable compiler api with a facade so that plugin authors using that libs is a little bit more safe.
I was searching for the same thing few month ago, this open source sample helped me a lot https://github.com/hadilq/trackable-compiler-plugin There isn't clear documentation anywhere! You need to do lots of try and error to make it work.
🙏 1
You can also have a look on KSP https://github.com/android/kotlin/tree/ksp/libraries/tools/kotlin-symbol-processing-api which itself is implemented as compiler plugin
That’s interesting, thanks! I’ll take a look