-
Notifications
You must be signed in to change notification settings - Fork 4k
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 16 toolchain support #13270
Comments
As the workaround, I'm trying to add support for building with JDK16 using Unfortunately it doesn't work yet:
Even though, the external OpenJDK was fetched as expected:
@comius Any idea, what I am missing? [1] https://gerrit-review.googlesource.com/c/gerrit/+/301362 |
Closes bazelbuild#13270. Change-Id: I215c2f86a35f87bea0102cf6da5248b19a319d3e
Closes bazelbuild#13270. Change-Id: I215c2f86a35f87bea0102cf6da5248b19a319d3e
Closes bazelbuild#13270. Change-Id: I215c2f86a35f87bea0102cf6da5248b19a319d3e
Closes bazelbuild#13270. Change-Id: I215c2f86a35f87bea0102cf6da5248b19a319d3e
Closes bazelbuild#13270. Change-Id: I215c2f86a35f87bea0102cf6da5248b19a319d3e
The diff --git a/tools/BUILD b/tools/BUILD
index c5f3691eae..2fb94b3947 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -1,8 +1,8 @@
load(
"@bazel_tools//tools/jdk:default_java_toolchain.bzl",
+ "BASE_JDK9_JVM_OPTS",
"DEFAULT_JAVACOPTS",
"DEFAULT_TOOLCHAIN_CONFIGURATION",
- "JDK9_JVM_OPTS",
"default_java_toolchain",
)
load("@rules_java//java:defs.bzl", "java_package_configuration")
@@ -13,7 +13,7 @@ default_java_toolchain(
name = "toolchain_jdk_16",
configuration = DEFAULT_TOOLCHAIN_CONFIGURATION,
java_runtime = "@openjdk_16_linux//:jdk",
- jvm_opts = JDK9_JVM_OPTS,
+ jvm_opts = BASE_JDK9_JVM_OPTS,
misc = DEFAULT_JAVACOPTS,
source_version = "16",
target_version = "16", |
Closes bazelbuild#13270. Change-Id: I215c2f86a35f87bea0102cf6da5248b19a319d3e
@cushon Thanks, it's embarrassing I missed that. I've updated gerrit CL: [1] and it works as expected. Unfortunately, I still need to patch Bazel with this PR. [1] https://gerrit-review.googlesource.com/c/gerrit/+/301362 |
Closes bazelbuild#13270. Change-Id: I215c2f86a35f87bea0102cf6da5248b19a319d3e
As can be seen from the failing coverage test with Java 16 toolchain:
JaCoCo version needs to be bumped to support Java 16. An actually asm update is needed. Currently is asm 8.0 used in Bazel, but the Java 16 support was only added in ASM_9_0_BETA: 14 July 2020: ASM 9.0 beta (tag ASM_9_0_BETA) |
Closes bazelbuild/java_tools#49 Closes #11674 Unblocks #13270, #13274. Closes #13343. PiperOrigin-RevId: 368428107
Closes bazelbuild#13270. Change-Id: I215c2f86a35f87bea0102cf6da5248b19a319d3e
Closes bazelbuild#13270. Change-Id: I215c2f86a35f87bea0102cf6da5248b19a319d3e
Description of the problem / feature request:
Support for java 16 to be used with toolchain resolution for java rules, e.g. with this section in
.bazelrc
:This build command should fetch remote JDK 16 and produce major java version 16:
Feature requests: what underlying problem are you trying to solve with this feature?
Build Java code and produce major java version 16.
According to JDK 16 release schedule: [1] the general availability was announced on 2021/03/16.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
What operating system are you running Bazel on?
Linux.
What's the output of
bazel info release
?Bazel@HEAD, Next major Bazel release (5.x) should include this feature.
Have you found anything relevant by searching the web?
There is a known issue with
DumpPlatformClassPath
.[1] https://openjdk.java.net/projects/jdk/16
The text was updated successfully, but these errors were encountered: