You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's some apparently buggy error-prone behavior:
$ touch WORKSPACE
$ cat X.java
package com.example;
class C implements Comparable<C> {
@Override
public int compareTo(C o) {
return 0;
}
}
public class X {}
$ cat BUILD
java_library(
name = 'X',
srcs = ['X.java'],
)
$ bazel build //:X
$ ~/bin/bazel --batch build :X
INFO: Analyzed target //:X (18 packages loaded, 322 targets configured).
INFO: Found 1 target...
ERROR: BUILD:1:13: Building libX.jar (1 source file) failed (Exit 1)
X.java:3: error: [ComparableType] Comparable should not be raw
class C implements Comparable<C> {
^
(see https://errorprone.info/bugpattern/ComparableType)
Target //:X failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.994s, Critical Path: 1.73s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
If you include -XDcompilePolicy=simple (or -XDcompilePolicy=byfile) it doesn't repro with Bazel either:
$ bazel build :X
...
X.java:3: error: [ComparableType] Comparable should not be raw
class C implements Comparable<C> {
^
(see https://errorprone.info/bugpattern/ComparableType)
$ bazel build --javacopt=-XDcompilePolicy=simple :X
...
Build completed successfully
Here's some apparently buggy error-prone behavior:
I'm reporting this here rather than https://github.com/google/error-prone because I can't reproduce it with raw javac:
The text was updated successfully, but these errors were encountered: