forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add incompatible_use_java_tools_beta_release option
Fixes bazelbuild#11446. Java tools are decoupled from Bazel distribution and downloaded from java_tools repository. If some of the tools is updated, the archive name is changed in Bazel and new Bazel release is conducted. If, however, new tool has some breaking changes, then the upgrade needs to be rolled back. To make user experience with upgrading tools less disruptive but still not unnecessary procrastinate releases of important Java tools like javac and Error Prone --incompatible_use_java_tools_beta_release is added and CI-job should be set up to check all downstream projects against upcoming java_tools release. Test Plan: 1. Upgrade Error Prone version to 2.3.4 Bazel that is known to have breaking changes and will break all Bazel users who rely on cross compilation use case. There are ongoing efforts to demote the offensive EP checks to warning severity instead of error, though: [1]. 2. Bump java_tools in beta_release archive to new java_tools distribution that includes Error Prone 2.3.4 3. Build rules_closure with --incompatible_use_java_tools_beta_release would fail with the known issue, because of unsatisfied dependency on javax.annotation: ERROR: /home/davido/projects/rules_closoure/java/io/bazel/rules/closure/BUILD:41:13: Building java/io/bazel/rules/closure/libtarjan.jar (1 source file) and running annotation processors (AutoAnnotationProcessor, AutoOneOfProcessor, AutoValueProcessor) failed (Exit 1) bazel-out/host/bin/java/io/bazel/rules/closure/_javac/tarjan/libtarjan_sourcegenfiles/io/bazel/rules/closure/AutoValue_Tarjan_Result.java:6: error: [ExtendsAutoValue] Do not extend an @AutoValue/@AutoOneOf class in non-generated code. final class AutoValue_Tarjan_Result<V> extends Tarjan.Result<V> { ^ (see https://errorprone.info/bugpattern/ExtendsAutoValue) See also upstream issue with in depth explanation what is going on there: [2] 4. Build rules_closure without the incompatible option: all is fine. That would mean, that all broken downstream projects would have enough time to adapt their build tool chains for upgraded dependencies in java_tools distribution. [1] google/error-prone#1619 [2] bazelbuild/rules_closure#483 Change-Id: I352297a8d0d86cecf30821c132c7871383e49b50
- Loading branch information
Showing
8 changed files
with
111 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters