https://kotlinlang.org logo
Title
z

Zac Sweers

06/10/2020, 9:22 PM
Is there an equivalent to
Messager
? I’ve noticed that simple printlns don’t work for this case, so currently doing
error("here")
-driven-development 😁
t

Ting-Yuan Huang

06/10/2020, 9:46 PM
It's in our backlog 🙂 Will be available later.
z

Zac Sweers

06/10/2020, 9:51 PM
Sounds good 👍 . In the meantime, I’ve had success just hopping in the debugger from a consuming project. For anyone else interested, say you’ve got a sample project consuming your processor. Example:
./gradlew :sample:build --no-daemon -Dorg.gradle.debug=true -Dkotlin.compiler.execution.strategy=in-process
t

Ting-Yuan Huang

06/10/2020, 9:57 PM
Thank you!
By the way, if debugging without daemon is too slow (it has to start jvm everytime),
./gradlew  -Dkotlin.daemon.jvm.options="-Xdebug,-Xrunjdwp:transport=dt_socket\,address=8765\,server=y\,suspend=n" ...
and attach to the KotlinCompileDaemon process in the debugger might worth trying.
z

Zac Sweers

06/10/2020, 10:06 PM
ah nice. Want to add that bit to this for others? https://github.com/android/kotlin/issues/3
(I added my above bit to that for anyone else interested)
j

Jiaxiang

06/10/2020, 10:09 PM
Thanks for bringing that up, Ting-Yuan's command has been what we have been using during development.
👍 1