From b4145b725868a2a2de6c453b63234a5fd4c93bf3 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Wed, 5 Aug 2026 15:10:33 +0200 Subject: [PATCH] Update remotejdk_21 to Zulu 21.0.12 Bump the remotejdk_21 pins from Zulu 21.46.19 (OpenJDK 21.0.9) to Zulu 21.52.15 (OpenJDK 21.0.12) for all six platforms. Zulu 21.0.9 lacks the backport of JDK-8341779 (reading type-use annotations on type-variable bounds from class files). This makes recent Error Prone report false positives such as NullArgumentForNonNullParameter on documented Guava API usage, e.g. Iterables.getFirst(iterable, null), when compiling with the Java 21 toolchain; see google/error-prone#5436 for the analysis by the Error Prone maintainers. The release is bumped in java/bazel/repositories_util.bzl and the config list regenerated with java/bazel:dump_remote_jdk_configs, as prescribed by the header of the generated list. Note that the macOS tar.gz archives changed after 21.0.9: the JDK has always lived in an application bundle under Contents/Home, but earlier releases also provided bin, lib, etc. symlinks from the archive root into Contents/Home, and those symlinks are gone in the new release. This is expressed as two entries in _STRIP_PREFIX_OVERRIDES; without them a plain version bump breaks the macOS toolchains. Fixes #369 --- java/bazel/repositories_util.bzl | 7 ++++++- java/repositories.bzl | 36 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/java/bazel/repositories_util.bzl b/java/bazel/repositories_util.bzl index 40101d37..20ac5d26 100644 --- a/java/bazel/repositories_util.bzl +++ b/java/bazel/repositories_util.bzl @@ -72,7 +72,7 @@ _RELEASE_CONFIGS = { }, "21": { "zulu": { - "release": "21.46.19-ca-jdk21.0.9", + "release": "21.52.15-ca-jdk21.0.12", "platforms": { "linux": ["aarch64", "x86_64"], "macos": ["aarch64", "x86_64"], @@ -106,6 +106,11 @@ _RELEASE_CONFIGS = { _STRIP_PREFIX_OVERRIDES = { "remotejdk11_win_arm64": "jdk-11.0.28+6", + # The Zulu 21 macOS archives changed layout after 21.0.9: they now + # contain an application bundle with the JDK under Contents/Home + # instead of a flat JDK image. + "remotejdk21_macos": "zulu21.52.15-ca-jdk21.0.12-macosx_x64/Contents/Home", + "remotejdk21_macos_aarch64": "zulu21.52.15-ca-jdk21.0.12-macosx_aarch64/Contents/Home", } def _name_for_remote_jdk(version, os, cpu): diff --git a/java/repositories.bzl b/java/repositories.bzl index df95f86d..b3eb94a1 100644 --- a/java/repositories.bzl +++ b/java/repositories.bzl @@ -262,49 +262,49 @@ _REMOTE_JDK_CONFIGS_LIST = [ struct( name = "remotejdk21_linux_aarch64", target_compatible_with = ["@platforms//os:linux", "@platforms//cpu:aarch64"], - sha256 = "a826a93c18d4388ec8d5d4057f5bb1b5c60f00ffc875ed299dea17aa947555ee", - strip_prefix = "zulu21.46.19-ca-jdk21.0.9-linux_aarch64", - urls = ["https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-linux_aarch64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-linux_aarch64.tar.gz"], + sha256 = "dc7ed9ab7dfd33f2ddb1cd8311d3b00738497961a420533d81088051eac3f195", + strip_prefix = "zulu21.52.15-ca-jdk21.0.12-linux_aarch64", + urls = ["https://cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-linux_aarch64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-linux_aarch64.tar.gz"], version = "21", ), struct( name = "remotejdk21_linux", target_compatible_with = ["@platforms//os:linux", "@platforms//cpu:x86_64"], - sha256 = "67e810b31427ac0ff1c249473595066a00bdf0f9265df186c32905d5f75c93b8", - strip_prefix = "zulu21.46.19-ca-jdk21.0.9-linux_x64", - urls = ["https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-linux_x64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-linux_x64.tar.gz"], + sha256 = "b1a9df12e798770d1b2db43b402a80f1e6080cff6d5d1d1fbe5c768fb4225f6a", + strip_prefix = "zulu21.52.15-ca-jdk21.0.12-linux_x64", + urls = ["https://cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-linux_x64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-linux_x64.tar.gz"], version = "21", ), struct( name = "remotejdk21_macos_aarch64", target_compatible_with = ["@platforms//os:macos", "@platforms//cpu:aarch64"], - sha256 = "b56112ad12d3dfe62802840655ecf198fe4ca48729824c939d65a69e803536c7", - strip_prefix = "zulu21.46.19-ca-jdk21.0.9-macosx_aarch64", - urls = ["https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-macosx_aarch64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-macosx_aarch64.tar.gz"], + sha256 = "84d38c4bf04f73d585bd319b949758d00abde50149a9522c2d9deef46b9a3ec6", + strip_prefix = "zulu21.52.15-ca-jdk21.0.12-macosx_aarch64/Contents/Home", + urls = ["https://cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-macosx_aarch64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-macosx_aarch64.tar.gz"], version = "21", ), struct( name = "remotejdk21_macos", target_compatible_with = ["@platforms//os:macos", "@platforms//cpu:x86_64"], - sha256 = "3d870d823e3e101189b00ad975188c0321e31056ac8ca8b487bcf4454f3b5cfe", - strip_prefix = "zulu21.46.19-ca-jdk21.0.9-macosx_x64", - urls = ["https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-macosx_x64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-macosx_x64.tar.gz"], + sha256 = "14e05cb1299c27cd26d3c5c6815723f63018df548dc7278c810767607902b4f4", + strip_prefix = "zulu21.52.15-ca-jdk21.0.12-macosx_x64/Contents/Home", + urls = ["https://cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-macosx_x64.tar.gz", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-macosx_x64.tar.gz"], version = "21", ), struct( name = "remotejdk21_win_arm64", target_compatible_with = ["@platforms//os:windows", "@platforms//cpu:arm64"], - sha256 = "1210b169db7b40d7305a94d41ab3eb87aaee51108b43f8f7f36f0c2865107790", - strip_prefix = "zulu21.46.19-ca-jdk21.0.9-win_aarch64", - urls = ["https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-win_aarch64.zip", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-win_aarch64.zip"], + sha256 = "d75658d371e025bb6378231551b4d53d1f5312cb0fccf7aa3b039d91ce1f0b7e", + strip_prefix = "zulu21.52.15-ca-jdk21.0.12-win_aarch64", + urls = ["https://cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-win_aarch64.zip", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-win_aarch64.zip"], version = "21", ), struct( name = "remotejdk21_win", target_compatible_with = ["@platforms//os:windows", "@platforms//cpu:x86_64"], - sha256 = "0c9812c0fe527b59f48c70cb527035c8a7abe620b31f776b4ddc21bddc1cd067", - strip_prefix = "zulu21.46.19-ca-jdk21.0.9-win_x64", - urls = ["https://cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-win_x64.zip", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.46.19-ca-jdk21.0.9-win_x64.zip"], + sha256 = "3c06e6693fd6fa725b985e66798a6a8293c75f52b793490754ad3c54d3d8b5a6", + strip_prefix = "zulu21.52.15-ca-jdk21.0.12-win_x64", + urls = ["https://cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-win_x64.zip", "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.52.15-ca-jdk21.0.12-win_x64.zip"], version = "21", ), struct(