-
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
Issue with Java header compilation #19598
Comments
Turbine is resolving JDK APIs from This looks like a The
I suspect this the same issue as #19537, which will be fixed by bazelbuild/rules_java@325a9e1 |
I just realized that this issues makes Bazel unable to compile certain Java 21 language features (e.g. records) even after adding Java runtime and compilation toolchains for this version unless users also set @hvadehra It would be great if we could get a rules_java release for Bazel 6.4.0 that includes bazelbuild/rules_java@325a9e1. |
@bazel-io flag |
@bazel-io fork 6.4.0 |
This is fixed in 6.4.0 and 7.0.0rc2. |
Description of the bug:
Java cannot find symbols from
com.sun.source.tree
when importing a target which depends oncom.sun.source
even though that target as no issues compiling on itself.See the example below for an example.
:a
compiles fine but:b
fails. For packages undercom.sun.tools.javac
adding--add-exports=jdk.compiler/com.sun.tools.javac.<package>=ALL-UNNAMED
tojavacopts
addresses the issue. However, doing the similar thing for this package has no effect.I think it's something related with header compilation since when header compilation is disabled it seems to work fine (
--nojava_header_compilation
).Which category does this issue belong to?
Java Rules
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
Ubuntu
What is the output of
bazel info release
?release 6.0.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: