Repository navigation
Conversation
Register checksum-pinned JDK 27 GA runtimes and a matching compilation toolchain. Use JDK 27 to compile Java 27 sources without changing the JDK used by older language toolchains. Include only available platforms and vendor download URLs.
The JDK 27 archives are now available on Bazel's mirror. Add the mirror URLs alongside the vendor URLs and remove the temporary vendor-only exception.
|
See #180 (comment) |
|
Sorry to see this closed — I'd like to make the case for reconsidering. The goal for Gerrit Code Review (which I maintain) and many others in the wild is just: $ bazel build --config=java27 gerritwhich only works if A personal module can't cover that: it can't publish to the Bazel mirror ( We'd offer this to all Gerrit Code Review stakeholders as an opt-in feature, keeping the default on the current Java LTS. Could we keep one canonical, mirror-backed home for non-LTS releases — opt-in in Would the Bazel team be open to that? |
|
A concrete downstream data point, in case it helps reconsideration. I wired this into Gerrit to validate the full flow (experimental change: gerrit/+/637823), consuming the PR with a git_override(
module_name = "rules_java",
remote = "https://github.com/sluongng/rules_java.git",
commit = "c9e6c5877b6103054cb2331340d31862c3fb7db6",
)With that, The catch is the method, and the change is explicitly marked experimental because of it: the only way to consume this today is pinning to a personal fork via So the earlier ask stands: could we keep one canonical, mirror-backed home for non-LTS GA releases, opt-in in |
No rules_java release in the Bazel Central Registry registers JDK 27 runtimes: JDK 27 is a non-LTS release, and rules_java deliberately carries only the LTS line (its remote toolchains top out at JDK 25). The JDK 27 support proposed in [1] is closed and was not merged. Rather than forking rules_java, this adds java_toolchains [2], a small standalone bzlmod module layered on rules_java. It contributes the non LTS JDK catalog (currently JDK 27) and reuses rules_java's own remote_java_repository, default_java_toolchain, and java_runtime_version_alias machinery, so there is no rules_java fork to track. rules_java stays pinned to JGit's chosen BCR version. The new module registers the remotejdk_27 runtime and supplies the @rules_java_toolchains//toolchains:remotejdk_27 label. tools/BUILD sources the JDK 27 runtime from that module and JDK 25 from rules_java. To build with JDK 27 and produce class-file major version 71, use one of $ bazel build --config=java27 all # local JDK 27 $ bazel build --config=remote27 all # RBE on GCP [1] bazelbuild/rules_java#385 [2] https://github.com/davido/java_toolchains Change-Id: Ia64905e57da3042dfa3715acec0c1bf555da0b78
Register checksum-pinned JDK 27 GA runtimes and a matching compilation
toolchain. Use JDK 27 to compile Java 27 sources without changing
the JDK used by older language toolchains.
Include only available platforms, with vendor and Bazel mirror download
URLs. Mirroring completed in bazelbuild/bazel#31433.