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

[BEAM-4556] Enable ErrorProne analysis and -Werror for all Java projects. #5773

Merged
merged 4 commits into from Jun 27, 2018

Conversation

swegner
Copy link
Contributor

@swegner swegner commented Jun 26, 2018

This is the final cleanup in the long road to enabling ErrorProne and warnings-as-errors for all Java projects.

🎆 🎆 🎆

Big thanks to everyone who helped out! @iemejia @timrobertson100 @cademarkegard @tengpeng


Follow this checklist to help us incorporate your contribution quickly and easily:

  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

It will help us expedite review of your Pull Request if you tag someone (e.g. @username) to look at it.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Spark
Go Build Status --- --- --- --- ---
Java Build Status Build Status Build Status Build Status Build Status Build Status
Python Build Status --- Build Status
Build Status
--- --- ---

…ings

FindBugs annotations are a mess. We want to eventually deprecate our own
usage of FindBugs, but we still need to deal with the annotations
because our dependencies (notable byte-buddy) use the annotations
without providing the dependency. This causes compile warnings such as:

  byte-buddy-1.8.11.jar(/net/bytebuddy/description/type/TypeList.class):
  warning: Cannot find annotation method 'value()' in type 'SuppressFBWarnings':
  class file for edu.umd.cs.findbugs.annotations.SuppressFBWarnings not found

To fix these warnings, we need to include a findbugs-annotations
dependency during compile which includes the SuppressFBWarnings
annotation. The dependency options we currently have are:

 * com.google.code.findbugs:annotations:3.0.1
   * Includes @SuppressFBWarnings, but licensed under LGPL
 * com.github.stephenc.findbugs:findbugs-annotations:1.3.9-1
   * Licensed under Apache 2.0, but doesn't include @SuppressFBWarnings

It is ok to use LGPL components during the build, as long as
they don't make it into the distribution. See:
 * https://www.apache.org/legal/resolved.html#prohibited
 * https://www.apache.org/legal/resolved.html#optional
@swegner swegner requested a review from iemejia June 26, 2018 21:35
@swegner
Copy link
Contributor Author

swegner commented Jun 26, 2018

Note that this contains db76995 which updates the findbugs-annotations dependency back to the LGPL version. I've opened #5772 separately to discuss this change.

@swegner
Copy link
Contributor Author

swegner commented Jun 27, 2018

Run Python PreCommit

@cademarkegard
Copy link
Contributor

🎆 congrats this is awesome

@iemejia
Copy link
Member

iemejia commented Jun 27, 2018

retest this please

Copy link
Member

@iemejia iemejia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Terrific to get to this point, thanks to all people who helped in this task.

@iemejia iemejia merged commit f0ccbf1 into apache:master Jun 27, 2018
@swegner swegner deleted the fail_on_warnings branch October 26, 2018 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants