-
Notifications
You must be signed in to change notification settings - Fork 243
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
Kythe is broken with Bazel@HEAD on Bazel CI #5594
Comments
|
/cc @shahms can you take a look? |
@meteorcloudy what changed as part of those Java tools? Kythe requires a JDK11-compatible source by default. |
We'd love to be able to |
@meteorcloudy Is there a way to get more precise date when this broke? Or bisection? Autosheriff is pointing to a wrong commit. The issue was reported 2 days ago, there's an older date in our logs. There were more java_tools releases after the one mentioned. Finding the right culprit is taking more time for me than what I would wish. |
Culprit finder (https://buildkite.com/bazel/culprit-finder/builds/5407#_) points to bazelbuild/bazel@75e0f7d, from the log, I don't think it's making mistake. I know this is a very old commit, but it's possible than when we just submitted this change it didn't break Kythe, but later some new commit in Kythe isn't compatible with this change (but is compatible with Bazel 6.x). |
So probably what I said here is wrong. |
The determined culprit is much more likely, but I'm confused as to why. The error indicates a JDK other than JDK11 is being used to compile that file, but you're inheriting our
|
This seems very likely to be bazelbuild/rules_java#95 We worked around that locally by not registering the default toolchains, but, uh, as you can see that's not super reliable. |
I think The
Has there been any progress on a self-contained repro? |
My reading of https://docs.oracle.com/en/java/javase/11/tools/javac.html is that cross-compilation doesn't work with Bazel for JDK versions 9 or greater when using JDK-internal classes:
|
The more recent docs at https://docs.oracle.com/en/java/javase/20/docs/specs/man/javac.html are the same with different formatting |
Bazel has all of the pieces to use it for cross-compilation and we're using it internally, but it may not be getting set up correctly here |
Ah, there are bugs in the JDK's handling of (I don't know if that's a problem here or not, but it is a problem) |
The java_toolchain.java_runtime comment helps a lot, considering: https://github.com/bazelbuild/rules_java/blob/master/toolchains/default_java_toolchain.bzl#L89 |
b/144849002 is now https://bugs.openjdk.org/browse/JDK-8307168, but I don't think it's related |
Yeah, I think the issue is with the use of the JDK-11 default_java_toolchain, which uses |
That isn't a problem as long as |
Presumably it wouldn't be a problem if |
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/2975#0187b105-58ad-4860-a44e-58412a0a4c30
Platform : Kythe (:ubuntu: 20.04 LTS (OpenJDK 11, gcc 9.4.0))
Error logs:
Note : Unable to reproduce this in local machine.
CC @meteorcloudy
The text was updated successfully, but these errors were encountered: