From my understanding, Kotlin still doesn't have a stable API for compiler plugins. Please let me know if this is incorrect.
The process of auto-discovery and integration of compiler plugins with the FIR IDE is also unclear. In my view, it doesn’t seem practical for arrow-meta to develop a metaprogramming framework until Kotlin introduces a public API for compiler plugins, which currently have limited support in the IDE.
Our goal was to make macros as easily as demonstrated in the examples at
https://github.com/arrow-kt/arrow-reflection/blob/main/arrow-reflect-compiler-plugin/src/testData/box/product_test.kt https://github.com/arrow-kt/arrow-reflection/blob/main/arrow-reflect-annotations/src/main/kotlin/arrow/meta/samples/Product.kt
However, achieving this required us to use many undocumented APIs.
We've faced similar challenges with other plugins we developed, like Arrow Analysis and Type proofs, where we had to create a duplicated structure for resolving call candidates.
Overall, my experience over the past five years has shown that Kotlin isn’t particularly friendly to metaprogramming. While I'm now focusing on AI, I would appreciate a robust metaprogramming solution for Kotlin, but I suspect significant advancements won’t occur until the compiler allows for greater extensibility.
Ultimately, it seems the Kotlin development team may have their reasons for not embracing metaprogramming capabilities, even though tools like Compose and Serialization have had to rely on compiler plugins.