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

Android desugar build broken due to errorprone-detected error #4414

Closed
philwo opened this issue Jan 9, 2018 · 6 comments
Closed

Android desugar build broken due to errorprone-detected error #4414

philwo opened this issue Jan 9, 2018 · 6 comments
Assignees
Labels
breakage P1 I'll work on this now. (Assignee required)

Comments

@philwo
Copy link
Member

philwo commented Jan 9, 2018

[node=linux-x86_64] ERROR: /home/ci/.cache/bazel/_bazel_ci/568b70756cfa0015d0bb31dbcf941213/bazel-sandbox/1719750086946967760/execroot/io_bazel/_tmp/2a109a4137b457914dd3a6d3268626c4/bazelbootstrap.W9dIJB5M/src/tools/android/java/com/google/devtools/build/android/desugar/BUILD:24:1: Building src/tools/android/java/com/google/devtools/build/android/desugar/libdesugar.jar (30 source files) and running annotation processors (OptionProcessor, AutoAnnotationProcessor, AutoValueProcessor) failed (Exit 1): java failed: error executing command 
[node=linux-x86_64]   (cd /home/ci/.cache/bazel/_bazel_ci/568b70756cfa0015d0bb31dbcf941213/bazel-sandbox/1719750086946967760/execroot/io_bazel/tmp/bazel_wDThJ3V7/out/execroot/io_bazel && \
[node=linux-x86_64]   exec env - \
[node=linux-x86_64]     LC_CTYPE=en_US.UTF-8 \
[node=linux-x86_64]   external/local_jdk/bin/java -XX:+TieredCompilation '-XX:TieredStopAtLevel=1' -Xbootclasspath/p:third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar -jar bazel-out/host/bin/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/bootstrap_deploy.jar @bazel-out/k8-opt/bin/src/tools/android/java/com/google/devtools/build/android/desugar/libdesugar.jar-2.params)
[node=linux-x86_64] src/tools/android/java/com/google/devtools/build/android/desugar/LambdaClassMaker.java:85: error: [StreamResourceLeak] Streams that encapsulate a closeable resource should be closed using try-with-resources
[node=linux-x86_64]         Files.list(rootPathPrefix.getParent())
[node=linux-x86_64]                   ^
[node=linux-x86_64]     (see http://errorprone.info/bugpattern/StreamResourceLeak)
[node=linux-x86_64]   Did you mean 'try (Stream<Path> paths ;'?
[node=linux-x86_64] Target //src:bazel failed to build
@jin jin self-assigned this Jan 9, 2018
@jin jin added type: bug P1 I'll work on this now. (Assignee required) breakage and removed type: bug labels Jan 9, 2018
@jin
Copy link
Member

jin commented Jan 9, 2018

@philwo
Copy link
Member Author

philwo commented Jan 9, 2018

I noticed it during a recent bazel-tests run. Sorry for not linking the log!

Good that the fix is in :) Let’s close this then.

@philwo philwo closed this as completed Jan 9, 2018
@philwo
Copy link
Member Author

philwo commented Jan 9, 2018

Oh wait, the link goes to a commit from December 16, suggesting that the fix might not have worked maybe? I’ll reopen for now.

@jin
Copy link
Member

jin commented Jan 9, 2018

I can repro this locally at HEAD. Looking.

$ bazel build //src:bazel
$ cp bazel-bin/src/bazel .
$ ./bazel build //src:bazel
INFO: Analysed target //src:bazel (1 packages loaded).
INFO: Found 1 target...
ERROR: /usr/local/google/home/jingwen/bazels/bazel_github/src/tools/android/java/com/google/devtools/build/android/desugar/BUILD:24:1: Building src/tools/android/java/com/google/devtools/build/android/desugar/libdesugar.jar (30 source files) and running annotation processors (OptionProcessor, AutoAnnotationProcessor, AutoValueProcessor) failed (Exit 1)
src/tools/android/java/com/google/devtools/build/android/desugar/LambdaClassMaker.java:85: error: [StreamResourceLeak] Streams that encapsulate a closeable resource should be closed using try-with-resources
        Files.list(rootPathPrefix.getParent())
                  ^
    (see http://errorprone.info/bugpattern/StreamResourceLeak)
  Did you mean 'try (Stream<Path> paths ;'?
Target //src:bazel failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2.228s, Critical Path: 1.19s
FAILED: Build did NOT complete successfully

@cushon
Copy link
Contributor

cushon commented Jan 9, 2018

Sorry, I sent a fix: https://bazel-review.googlesource.com/c/bazel/+/31292

@jin
Copy link
Member

jin commented Jan 9, 2018

Almost sent out the same fix :-) Will import. Thanks @cushon

ronshapiro pushed a commit to google/error-prone that referenced this issue Jan 12, 2018
cushon added a commit to google/error-prone that referenced this issue Jan 12, 2018
iirina pushed a commit that referenced this issue Jan 15, 2018
Fixes #4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
iirina pushed a commit that referenced this issue Jan 15, 2018
Fixes #4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
iirina pushed a commit that referenced this issue Jan 18, 2018
Fixes #4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
iirina pushed a commit that referenced this issue Jan 19, 2018
Fixes #4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
iirina pushed a commit that referenced this issue Jan 23, 2018
Fixes #4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
iirina pushed a commit that referenced this issue Jan 24, 2018
Fixes #4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
iirina pushed a commit that referenced this issue Jan 26, 2018
Fixes #4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
iirina pushed a commit that referenced this issue Jan 26, 2018
Fixes #4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
iirina pushed a commit that referenced this issue Jan 30, 2018
Fixes #4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
iirina pushed a commit that referenced this issue Jan 30, 2018
Fixes #4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
iirina pushed a commit that referenced this issue Feb 12, 2018
Fixes #4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
werkt pushed a commit to werkt/bazel that referenced this issue Mar 2, 2018
Fixes bazelbuild#4414

Change-Id: I06eac192b5be84bd84190980fbcd05574e3a4439
PiperOrigin-RevId: 181465165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breakage P1 I'll work on this now. (Assignee required)
Projects
None yet
Development

No branches or pull requests

3 participants