Is there any way to turn on `allWarningsAsErrors` ...
# announcements
w
Is there any way to turn on
allWarningsAsErrors
but allow deprecation warnings?
allWarningsAsErrors
is nice, but it prevents us from using
@Deprecated
annotation to provide seamless code migrations 😕
a
We're strongly considering writing a compiler plugin to do exactly this on the #CJLTWPH7S team.
w
😕 There’s an issue open for it btw https://youtrack.jetbrains.com/issue/KT-24746.
writing a compiler plugin to do exactly this
What would it change to achieve this? Can you intercept warnings with a compiler plugin?
👍 1
a
Apparently yes, one of our team noted that this should be possible. I'm not personally familiar with the details but our team is experiencing the same problem. We would like to do incremental migration from deprecated code while still keeping warnings as errors for everything else.
👍 1