I just released my in-process compiler (plugin) te...
# feed
a
I just released my in-process compiler (plugin) testing framework for Kotlin on Maven Central. It offers JUnit based unit tests for Kotlin compiler plugins/logic using an expressive DSL for compiler reports and FIR/IR output. Feature suggestions are very welcome 🙂 https://github.com/karmakrafts/Iridium
❤️ 5
🚀 1
f
How does this compare to the Kotlin compile testing library?
a
It mainly boils down to a nice DSL and Kotlin Test integration out of the box. It also provides matchers for compiler messagess, IR and FIR elements among some other QoL features.
It also supports IR and FIR plugins, which is what i wrote it for. You configure a test compiler pipeline, register your plugin(s) and you can test the behaviour of your plugins easily.
Also my library is completely documented in contrast to JBs internal testing framework. It supports in-line syntax higlighting for input sources and more.
Also those advantages mostly apply compared to kotlin-compile-testing too
If you want to test annotation processors, that is still on the roadmap for my library since i didn't need it in production yet. However if there's a need for it, i'm happy to implement it ^^
Also, kotlin-compile-testing technically isn't in-process either, since they invoke the CLICompiler interface. My API drives the raw compiler API, which allows me to intercept certain parts of the compiler itself if needed, quite nice.