Is there a way to suppress the ```w: ATTENTION! T...
# k2-adopters
s
Is there a way to suppress the
Copy code
w: ATTENTION!
 This build uses experimental K2 compiler:
  -Xuse-k2
output? Otherwise projects with
allWarningsAsErrors = true
cannot participate in the early adoption.
👀 1
d
There is no way to suppress it You can add
-Werror
flag only if
-Xuse-k2
is not passed in build scripts (we do the same for local compilation of Kotlin itself with K2 locally)
s
Right, but then there's a risk that in local builds / code committed locally to Git compiler warnings will get introduced. Would it be an option to make this configurable? Or actually drop it altogether, as the user already has explicitly opted-in for K2 via
useK2
, so why warn about it? Maybe make it just an info instead.
d
Compilation with K2 without warnings does not guarantee that there won't be warnings with K1, because some warnings and errors differ between K1 and K2 and some of them are missing by design in K2 (e.g. K2 won't report about unused parameter) So it always be a blocker, because it's not recommended to use K2 on CI (because K2 is not quite ready for production)
s
Ok, makes sense, thanks.