-
Notifications
You must be signed in to change notification settings - Fork 73
Increase maxwarns to -1 #291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Please see bazelbuild/bazel#25927 (comment) It's important not to filter out any warnings otherwise the lint warnings are not surfaced and then any attempt to do `-Werror` can fail with what may be observed as spurious (affect other parts of the codebase). This is maybe a "breaking change" only if someone has enabled `-Werror` and may now see additional errors -- although that was in fact their intention...
The motivation for this sounds reasonable to me, but I think we should only be setting defaults that make sense for everyone, all the time. So, it's probably best if we actually trim down the default list to an empty one rather than expanding it (so the default javac behavior is what everyone gets out-of-the-box). If you'd like to have different behavior, consider registering a custom java_toolchain with those options. |
FWIW I think this default sort of makes sense for everyone, the status quo is that errors may not be shown if there are too many warnings, and then there's no way to tell why the build failed from the log. There is an underlying bug causing that which should be fixed, but until then this default is helpful for everyone. And I also agree in theory it would be nice to use javac defaults, but in practice I'm not sure there's a strong reason to change this default upstream, the issue here is Bazel-specific. |
Yea -- basically without this PR users of rules_java are subject to potential bugs that I've documented in the bug. |
Is this because JavaBuilder does not propagate the |
It's related to that: bazelbuild/bazel#25927 (comment)
Hard-coding |
Please see bazelbuild/bazel#25927 (comment)
It's important not to filter out any warnings otherwise the lint warnings are not surfaced and then any attempt to do
-Werror
can fail with what may be observed as spurious (affect other parts of the codebase).This is maybe a "breaking change" only if someone has enabled
-Werror
and may now see additional errors -- although that was in fact their intention...