-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
java_plugin header compilation failure #12605
Comments
cc @cushon |
Thanks for the report and the nice repro. I agree the cast seems like a straightforward bug. (The turbine repo now accepts issues also, I think that was just an oversight.) The mac/linux difference here is because it's using different turbine implementations, see
|
bazelbuild/bazel#12605 PiperOrigin-RevId: 345738549
bazelbuild/bazel#12605 PiperOrigin-RevId: 345742937
I submitted a fix: google/turbine@b2a0c70 We'll need to update the version of turbine in |
Linux in the first output of The second query I checked version 10.4 is fine (in this respect, not turbine fix). https://github.com/bazelbuild/java_tools/releases/tag/javac11_v10.4 java_tools v11.0 will only work on bazel@head |
@jfancher would you mind adding a license to your reproduction repo? I would like to use the code for the regression test. The failure happens on all JDK versions (not just 15). |
* Java_tools javac11 v10.5 rc1. * Regression tests for #12605 * Java_tools javac11 v10.5 release.
For blaze versions <= 4.0.0 the issues is fixed by java_tools release 10.5 https://github.com/bazelbuild/java_tools/releases/tag/javac11_v10.5 |
When you say it happens on all versions, do you mean at Bazel head? Or with that tools release? To clarify my original report -- on macOS, Bazel 3.7, and Java 11, my reproducer build passes (for me). I updated the Anyway, my confusion aside, it sounds like you figured out what's going on -- thanks! I've added a license as requested; let me know if there's anything else I can do. |
It worked for you because of double failure. java_tools release 10.1 incorrectly uses Turbine instead of TurbineDirect on some OS, JDK combinations. With newer java_tools TurbineDirect is correctly used and fails for all JDK versions. |
* Java_tools javac11 v10.5 rc1. * Regression tests for #12605 * Java_tools javac11 v10.5 release.
* Java_tools javac11 v10.5 rc1. * Regression tests for #12605 * Java_tools javac11 v10.5 release.
This is currently marked as an open release blocker for Bazel 4.0 - is this still the case? |
Not blocker, it was cherrypicked for 4.0. Still need to release java_tools at @Head before I can close it. |
* Java_tools javac11 v10.5 rc1. * Regression tests for #12605 * Java_tools javac11 v10.5 release.
* Java_tools javac11 v10.5 rc1. * Regression tests for #12605 * Java_tools javac11 v10.5 release.
* Java_tools javac11 v10.5 rc1. * Regression tests for bazelbuild#12605 * Java_tools javac11 v10.5 release.
Description of the problem / feature request:
Two parts to this issue:
First, I ran into an exception during Java header compilation. Turbine does an unsafe cast here, which caused an annotation processor to fail during header compilation. This seems like a straightforward bug -- I'm not sure if there's a better place to report it since the
turbine
repo does not allow issues.Second, and more bazel-specific, I only ran into this issue upon upgrading to JDK 15. I followed the process outlined here to use the JDK 15 release of the remote tools. For some reason, this failure only happens with that toolchain, not with Java 8 or 11. Is there something different about the turbine jar it uses or how it invokes it? I could not figure out the difference.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Full reproducer here: https://github.com/jfancher/bazel-issues/tree/turbine-elements
The basic setup is:
java_plugin
)P
that calls the offending method (note: withgenerates_api
flag)A
that usesP
B
that referencesA
B
What operating system are you running Bazel on?
macOS
What's the output of
bazel info release
?release 3.7.0
Have you found anything relevant by searching the web?
Nope.
Any other information, logs, or outputs that you want to share?
Full build log:
The text was updated successfully, but these errors were encountered: