when enabling K2, my build <fails> because I have ...
# k2-adopters
p
when enabling K2, my build fails because I have allWarningsAsErrors = true set. I wouldn’t like to set it to
false
, my expectation is to just use K2 and perhaps suppress this single K2-related warning. Is it possible?
maybe somehow vial
-opt-in
?
but then it would be weird to declare I want to use K2 in two places 🤔
h
This has been asked before (e.g. https://kotlinlang.slack.com/archives/C03PK0PE257/p1690614253250919) but so far I don't think it's possible to suppress the warning.
p
ok, perhaps something to take into consideration when introducing such warnings in the future
a
https://youtrack.jetbrains.com/issue/KT-56652/Cannot-use-K2-along-with-Werror-all-warnings-as-errors
Since 1.8.20, the workaround is -Xsuppress-version-warnings (assuming that -language-version 2.0 is used)
thank you color 2
c
this is exactly why I also do not want to enable K2 yet, except for experiments. I NEED "allWarningsAsErrors = true" or the cats i'm hearding will commit all kinds of warning code. 🙂
😂 2