Stupid question, I can attach a debuger into a com...
# compiler
u
Stupid question, I can attach a debuger into a compiler plugin, but how do I print something to console?
println
doesn't seem to work, and I have
verbose
flag in compile options as well (building via gradle)
r
In my experience, you need to get a hold of a
MessageCollector
or create specific diagnostic messages that you can emit with the BindingTrace. Simple printlns work for me in tests but does not show up when running the plugin over a project.
s
I get output when I use
-Dkotlin.compiler.execution.strategy="in-process"
when invoking via
./gradlew
👌 2
y
You can get a message collector from the
CompilerConfiguration
object btw using the
MESSAGE_COLLECTOR
compiler configuration key I think