-
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 17 support #13965
Comments
Duplicate of #13416. |
Also is #13966 different? |
@gregestren This issue was about getting support for Java 17 at all in the tree. #13966 is about getting an official stable release of bazel that people can download and use it without needing to compile their own version of bazel. |
P3, changes are very welcome and we will offer active support to any contributors. |
Step one here would presumably be to upgrade errorprone to the latest version, which includes a few jdk17 fixes. That will let us use jdk17 as the runtime, even if we can't use source/target versions. How does one go about that? Thanks! |
Oh nice thanks!
…On Tue, 21 Sep 2021 at 00:34, Liam Miller-Cushon ***@***.***> wrote:
I think Bazel has already been updated to the latest Error Prone release
in 68e14b5
<68e14b5>,
that part might just be blocked on a java_tools release.
Another problem is that turbine doesn't support all of the features up to
Java 17 yet (e.g. records: #13924
<#13924>), I'm still working on
that part.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#13965 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABN425MHFD3UFNMTUS3PRM3UC7AIXANCNFSM5DXN36JQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@meteorcloudy could you add JDK 17 to the Bazel mirror (similar to #13274 (comment)) ? |
The Java 17 test is failing with the following known issue in Error Prone 2.6.0, this needs a
|
@hvadehra is handling release in bazelbuild/java_tools#51, there were some issues during the release, I didn't look into it yet, perhaps @cushon, you can help? |
java_tools v11.4 has been released |
With #13416 and Header compilation is still broken (#13924), that's fixed in turbine at head (google/turbine@ec67a6e). I'm waiting for another turbine change to land, and then I'll send an update for that. |
google/turbine@cb60060 Required for #13965. Closes #14059. Signed-off-by: Philipp Wollermann <[email protected]>
A quick update:
Once all of that happens, Bazel at head will have initial support for Java 17. |
google/turbine@0b547dc google/turbine@cb60060 Related to #13965. Closes #14059. Signed-off-by: Philipp Wollermann <[email protected]>
See https://docs.oracle.com/javase/specs/jvms/se17/html/jvms-4.html#jvms-4.7.30 #13965 PiperOrigin-RevId: 400755863
See https://docs.oracle.com/javase/specs/jvms/se17/html/jvms-4.html#jvms-4.7.31 #13965 PiperOrigin-RevId: 401025676
With #14089 patched in, simple Java 17 examples work when passing I'd appreciate if anyone wants to try this out and report issues you find. We aren't using Java 17 much yet, so I don't have a lot of code to test against. |
I just pulled latest bazel, updated the jdk version to 17, and everything built + tested fine. (man I love bazel, the fact that I could do this so trivially is completel awesome) Thank you all for doing this! |
It would be great if you could look into #14249 |
Description of the feature request:
Java 17 is expected to ship during the middle of September. It's the first LTS Java release since Java 11. Once it's out, teams using Bazel will want to migrate to Java 17, and Bazel needs to support this out-of-the-box.
While Bazel ships with toolchains to support different Java versions, there's nothing for java 17 yet (understandably), and it's not obvious how to hook in a custom JDK. The recommended way to do this is via the hermetic toolchains, but this feature only works in Bazel 5. Back-porting that to Bazel 4 seems complicated.
The alternative is a snippet much like:
Here,
@forked_jdk
points to a custom JDK (assume it's something like "OpenJDK with some patches" such as Amazon Corretto)The key missing piece is
@bazel_tools//tools/jdk:toolchain_java17
. The lasttoolchain_javaXX
was for Java 11. If that was added, then we'd be able to make the jump to Java 17 quickly.Feature requests: what underlying problem are you trying to solve with this feature?
People validating their builds on Java 17 need their build tool to properly support Java 17
The text was updated successfully, but these errors were encountered: