Skip to content

Commit

Permalink
Bazel: Disable ImmutableAnnotationChecker error prone check
Browse files Browse the repository at this point in the history
The severity of this check was demoted to WARN in Id7911fb6dd8. But
then was promoted again to ERROR in I72d6044a4d5. However, the root
cause of the compilation breakage is the Error Prone false positive
error reporting for ImmutableAnnotationChecker check on Java 11 and
later: [1], [2].

Disable the check for now, and consider to re-enable it again, when
the breakage is fixed upstream.

This is needed to support building Gerrit on Java 11 and newer Java
versions.

[1] bazelbuild/bazel#9378
[2] google/error-prone#1348

Change-Id: Ib1778629fef5e2f61891ff0a176e4b5c74f2aa8a
  • Loading branch information
davido authored and David Ostrovsky committed Sep 16, 2019
1 parent 06edaeb commit dfe7d71
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ default_java_toolchain(
# enabled. This warnings list is originally based on:
# https://github.com/bazelbuild/BUILD_file_generator/blob/master/tools/bazel_defs/java.bzl
# However, feel free to add any additional errors. Thus far they have all been pretty useful.
# TODO(davido): Enable ImmutableAnnotationChecker again when these issues are fixed:
# https://github.com/google/error-prone/issues/1348
# https://github.com/bazelbuild/bazel/issues/9378
java_package_configuration(
name = "error_prone",
javacopts = [
Expand All @@ -55,7 +58,7 @@ java_package_configuration(
"-Xep:FunctionalInterfaceClash:ERROR",
"-Xep:FutureReturnValueIgnored:ERROR",
"-Xep:GetClassOnEnum:ERROR",
"-Xep:ImmutableAnnotationChecker:ERROR",
"-Xep:ImmutableAnnotationChecker:OFF",
"-Xep:ImmutableEnumChecker:ERROR",
"-Xep:IncompatibleModifiers:ERROR",
"-Xep:InjectOnConstructorOfAbstractClass:ERROR",
Expand Down

0 comments on commit dfe7d71

Please sign in to comment.