Skip to content
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

FR: Allow "Note" output from javac to be suppressed #1405

Closed
ekuefler opened this issue Jun 14, 2016 · 1 comment
Closed

FR: Allow "Note" output from javac to be suppressed #1405

ekuefler opened this issue Jun 14, 2016 · 1 comment
Labels
category: misc > misc P3 We're not considering working on this, but happy to review a PR. (No assignee) type: bug
Milestone

Comments

@ekuefler
Copy link
Contributor

When Bazel builds a Java target, it very frequently ends up printing lines like this:

INFO: From Building src/main/java/com/myapp/libmyapp.jar (81 source files):
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

For a moderately large build, these lines can end up repeated hundreds of times, creating lots of terminal scrolling and noise in the output. It would be nice if there were some way to suppress javac's Note output.

This is really a javac issue rather than a Bazel issue, since javac provides no good way to suppress deprecation warnings in general. But Bazel exacerbates the problem by encouraging fine-grained targets where javac is invoked many times per build, so it might be reasonable to do some processing of javac's output within Bazel.

@hermione521 hermione521 added type: bug P3 We're not considering working on this, but happy to review a PR. (No assignee) category: misc > misc labels Jun 15, 2016
@cushon
Copy link
Contributor

cushon commented Jun 21, 2016

Internally we modified javac to stop emitting those deferred notes for unchecked, deprecation, and sunapi. A cleaner option would be to use the javac API (instead of calling its main method) so we can get structured diagnostics back, and filter out the notes. That would also help with #1342.

@damienmg damienmg added this to the 1.0 milestone Jun 28, 2016
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 5, 2022
    Fixes bazelbuild/bazel#1405

    --
    PiperOrigin-RevId: 145015113
    MOS_MIGRATED_REVID=145015113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: misc > misc P3 We're not considering working on this, but happy to review a PR. (No assignee) type: bug
Projects
None yet
Development

No branches or pull requests

4 participants