Skip to content

Commit

Permalink
Replace JDK 19 archives with JDK 20.
Browse files Browse the repository at this point in the history
Per adoptium/adoptium#218 (comment), our source of Linux s390x JDK binaries is not producing them for JDK 20. So, Linux s390x has been dropped for JDK 20.

Closes #18028.

PiperOrigin-RevId: 523911188
Change-Id: Iffb88c7925875718d16f0d5d5e83149c76f2c4c7
  • Loading branch information
benjaminp authored and copybara-github committed Apr 13, 2023
1 parent acec6c0 commit 0e8e611
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 124 deletions.
8 changes: 4 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ dist_http_archive(
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE,
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN,
)
for version in ("17", "19")
for os in ("linux", "linux_s390x", "macos", "macos_aarch64", "win") + (("win_arm64",) if version != "19" else ())
for version in ("17", "20")
for os in ("linux", "macos", "macos_aarch64", "win") + (("linux_s390x", "win_arm64") if version != "20" else ())
]

# Used in src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE.
Expand Down Expand Up @@ -501,8 +501,8 @@ java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
""",
)
for version in ("17", "19")
for os in ("linux", "linux_s390x", "darwin", "darwin_aarch64", "windows") + (("windows_arm64",) if version != "19" else ())
for version in ("17", "20")
for os in ("linux", "darwin", "darwin_aarch64", "windows") + (("linux_s390x", "windows_arm64",) if version != "20" else ())
]

load("@io_bazel_skydoc//:setup.bzl", "stardoc_repositories")
Expand Down
91 changes: 39 additions & 52 deletions distdir_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -713,85 +713,72 @@ DIST_DEPS = {
"test_WORKSPACE_files",
],
},
"remotejdk19_linux_aarch64": {
"remotejdk20_linux_aarch64": {
"aliases": [
"remotejdk19_linux_for_testing",
"remotejdk20_linux_for_testing",
],
"archive": "zulu19.32.13-ca-jdk19.0.2-linux_aarch64.tar.gz",
"sha256": "76216efa69e448fe487d57310372aea0df1cf15b82974c84a8cb0d97eb934165",
"strip_prefix": "zulu19.32.13-ca-jdk19.0.2-linux_aarch64",
"archive": "zulu20.28.85-ca-jdk20.0.0-linux_aarch64.tar.gz",
"sha256": "47ce58ead9a05d5d53b96706ff6fa0eb2e46755ee67e2b416925e28f5b55038a",
"strip_prefix": "zulu20.28.85-ca-jdk20.0.0-linux_aarch64",
"urls": [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-linux_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-linux_aarch64.tar.gz",
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu20.28.85-ca-jdk20.0.0-linux_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu20.28.85-ca-jdk20.0.0-linux_aarch64.tar.gz",
],
"used_in": ["test_WORKSPACE_files"],
},
"remotejdk19_linux_s390x": {
"remotejdk20_linux": {
"aliases": [
"remotejdk19_linux_s390x_for_testing",
"openjdk19_linux_s390x_archive",
"remotejdk20_linux_for_testing",
"openjdk20_linux_archive",
],
"archive": "OpenJDK19U-jdk_s390x_linux_hotspot_19.0.2_7.tar.gz",
"sha256": "f2512f9a8e9847dd5d3557c39b485a8e7a1ef37b601dcbcb748d22e49f44815c",
"strip_prefix": "jdk-19.0.2+7",
"archive": "zulu20.28.85-ca-jdk20.0.0-linux_x64.tar.gz",
"sha256": "0386418db7f23ae677d05045d30224094fc13423593ce9cd087d455069893bac",
"strip_prefix": "zulu20.28.85-ca-jdk20.0.0-linux_x64",
"urls": [
"https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2%2B7/OpenJDK19U-jdk_s390x_linux_hotspot_19.0.2_7.tar.gz",
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu20.28.85-ca-jdk20.0.0-linux_x64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu20.28.85-ca-jdk20.0.0-linux_x64.tar.gz",
],
"used_in": ["test_WORKSPACE_files"],
},
"remotejdk19_linux": {
"remotejdk20_macos": {
"aliases": [
"remotejdk19_linux_for_testing",
"openjdk19_linux_archive",
"remotejdk20_macos_for_testing",
"openjdk20_darwin_archive",
],
"archive": "zulu19.32.13-ca-jdk19.0.2-linux_x64.tar.gz",
"sha256": "4a994aded1d9b35258d543a59d4963d2687a1094a818b79a21f00273fbbc5bca",
"strip_prefix": "zulu19.32.13-ca-jdk19.0.2-linux_x64",
"archive": "zulu20.28.85-ca-jdk20.0.0-macosx_x64.tar.gz",
"sha256": "fde6cc17a194ea0d9b0c6c0cb6178199d8edfc282d649eec2c86a9796e843f86",
"strip_prefix": "zulu20.28.85-ca-jdk20.0.0-macosx_x64",
"urls": [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-linux_x64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-linux_x64.tar.gz",
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu20.28.85-ca-jdk20.0.0-macosx_x64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu20.28.85-ca-jdk20.0.0-macosx_x64.tar.gz",
],
"used_in": ["test_WORKSPACE_files"],
},
"remotejdk19_macos": {
"remotejdk20_macos_aarch64": {
"aliases": [
"remotejdk19_macos_for_testing",
"openjdk19_darwin_archive",
"remotejdk20_macos_aarch64_for_testing",
"openjdk20_darwin_aarch64_archive",
],
"archive": "zulu19.32.13-ca-jdk19.0.2-macosx_x64.tar.gz",
"sha256": "2804575ae9ac63e39caa910e57610bf52b0f9e2d671928a98d18e2fcc9f62ac1",
"strip_prefix": "zulu19.32.13-ca-jdk19.0.2-macosx_x64",
"archive": "zulu20.28.85-ca-jdk20.0.0-macosx_aarch64.tar.gz",
"sha256": "a2eff6a940c2df3a2352278027e83f5959f34dcfc8663034fe92be0f1b91ce6f",
"strip_prefix": "zulu20.28.85-ca-jdk20.0.0-macosx_aarch64",
"urls": [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-macosx_x64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-macosx_x64.tar.gz",
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu20.28.85-ca-jdk20.0.0-macosx_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu20.28.85-ca-jdk20.0.0-macosx_aarch64.tar.gz",
],
"used_in": ["test_WORKSPACE_files"],
},
"remotejdk19_macos_aarch64": {
"remotejdk20_win": {
"aliases": [
"remotejdk19_macos_aarch64_for_testing",
"openjdk19_darwin_aarch64_archive",
"remotejdk20_win_for_testing",
"openjdk20_windows_archive",
],
"archive": "zulu19.32.13-ca-jdk19.0.2-macosx_aarch64.tar.gz",
"sha256": "177d058d968b2fbe7a5ff5eceb18cdc16f6376ce291004f1a3139e78b2fb6391",
"strip_prefix": "zulu19.32.13-ca-jdk19.0.2-macosx_aarch64",
"archive": "zulu20.28.85-ca-jdk20.0.0-win_x64.zip",
"sha256": "ac5f6a7d84dbbb0bb4d376feb331cc4c49a9920562f2a5e85b7a6b4863b10e1e",
"strip_prefix": "zulu20.28.85-ca-jdk20.0.0-win_x64",
"urls": [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-macosx_aarch64.tar.gz",
"https://cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-macosx_aarch64.tar.gz",
],
"used_in": ["test_WORKSPACE_files"],
},
"remotejdk19_win": {
"aliases": [
"remotejdk19_win_for_testing",
"openjdk19_windows_archive",
],
"archive": "zulu19.32.13-ca-jdk19.0.2-win_x64.zip",
"sha256": "d6c768c5ec3252f936bd0562c25458f7c753c62835ca3e91166f975f7a5fe9f1",
"strip_prefix": "zulu19.32.13-ca-jdk19.0.2-win_x64",
"urls": [
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-win_x64.zip",
"https://cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-win_x64.zip",
"https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu20.28.85-ca-jdk20.0.0-win_x64.zip",
"https://cdn.azul.com/zulu/bin/zulu20.28.85-ca-jdk20.0.0-win_x64.zip",
],
"used_in": ["test_WORKSPACE_files"],
},
Expand Down
8 changes: 4 additions & 4 deletions src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -589,11 +589,11 @@ filegroup(
"@rules_python//:WORKSPACE",
] + [
"@openjdk%s_%s_archive//:WORKSPACE" % (version, os)
for version in ("17", "19")
for os in ("darwin", "darwin_aarch64", "linux", "linux_s390x", "windows") + (("windows_arm64",) if version != "19" else ())
for version in ("17", "20")
for os in ("darwin", "darwin_aarch64", "linux", "windows") + (("linux_s390x", "windows_arm64") if version != "20" else ())
] + [
"@remotejdk%s_%s_for_testing//:WORKSPACE" % (version, os)
for version in ("17", "19")
for os in ("macos", "macos_aarch64", "linux", "linux_s390x", "win") + (("win_arm64",) if version != "19" else ())
for version in ("17", "20")
for os in ("macos", "macos_aarch64", "linux", "win") + (("linux_s390x", "win_arm64") if version != "20" else ())
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ gen_workspace_stanza(
"remotejdk11_win_arm64",
] + [
"remotejdk%s_%s" % (version, os)
for version in ("17", "19")
for os in ("macos", "macos_aarch64", "linux", "linux_aarch64", "linux_s390x", "win") + (("win_arm64",) if version != "19" else ())
for version in ("17", "20")
for os in ("macos", "macos_aarch64", "linux", "linux_aarch64", "win") + (("linux_s390x", "win_arm64") if version != "20" else ())
],
template = "jdk.WORKSPACE.tmpl",
visibility = ["//:__pkg__"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,67 +185,56 @@ maybe(
# This must be kept in sync with the top-level WORKSPACE file.
maybe(
remote_java_repository,
{remotejdk19_linux}
{remotejdk20_linux}
target_compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
version = "19",
version = "20",
)

# This must be kept in sync with the top-level WORKSPACE file.
maybe(
remote_java_repository,
{remotejdk19_linux_aarch64}
{remotejdk20_linux_aarch64}
target_compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:aarch64",
],
version = "19",
version = "20",
)

# This must be kept in sync with the top-level WORKSPACE file.
maybe(
remote_java_repository,
{remotejdk19_linux_s390x}
target_compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:s390x",
],
version = "19",
)

# This must be kept in sync with the top-level WORKSPACE file.
maybe(
remote_java_repository,
{remotejdk19_macos}
{remotejdk20_macos}
target_compatible_with = [
"@platforms//os:macos",
"@platforms//cpu:x86_64",
],
version = "19",
version = "20",
)

# This must be kept in sync with the top-level WORKSPACE file.
maybe(
remote_java_repository,
{remotejdk19_macos_aarch64}
{remotejdk20_macos_aarch64}
target_compatible_with = [
"@platforms//os:macos",
"@platforms//cpu:aarch64",
],
version = "19",
version = "20",
)

# This must be kept in sync with the top-level WORKSPACE file.
maybe(
remote_java_repository,
{remotejdk19_win}
{remotejdk20_win}
target_compatible_with = [
"@platforms//os:windows",
"@platforms//cpu:x86_64",
],
version = "19",
version = "20",
)

maybe(
Expand Down
9 changes: 4 additions & 5 deletions src/test/py/bazel/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,10 @@ class TestBase(unittest.TestCase):
'remotejdk17_macos_aarch64_for_testing',
'remotejdk17_win_for_testing',
'remotejdk17_win_arm64_for_testing',
'remotejdk19_linux_for_testing',
'remotejdk19_linux_s390x_for_testing',
'remotejdk19_macos_for_testing',
'remotejdk19_macos_aarch64_for_testing',
'remotejdk19_win_for_testing',
'remotejdk20_linux_for_testing',
'remotejdk20_macos_for_testing',
'remotejdk20_macos_aarch64_for_testing',
'remotejdk20_win_for_testing',
'remote_java_tools_for_testing',
'remote_java_tools_darwin_x86_64_for_testing',
'remote_java_tools_darwin_arm64_for_testing',
Expand Down
4 changes: 2 additions & 2 deletions src/test/shell/bazel/testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ gen_workspace_stanza(
"openjdk11_windows_arm64_archive",
] + [
"openjdk%s_%s_archive" % (version, os)
for version in ("17", "19")
for os in ("linux", "linux_s390x", "darwin", "darwin_aarch64", "windows") + (("windows_arm64",) if version != "19" else ())
for version in ("17", "20")
for os in ("linux", "darwin", "darwin_aarch64", "windows") + (("linux_s390x", "windows_arm64") if version != "20" else ())
],
template = "jdk_http_archives.tmpl",
visibility = ["//:__pkg__"],
Expand Down
19 changes: 5 additions & 14 deletions src/test/shell/bazel/testdata/jdk_http_archives.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -111,42 +111,33 @@ exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
""",
)

#################################### JDK 19 ####################################
#################################### JDK 20 ####################################
http_archive(
{openjdk19_linux_archive}
build_file_content = """
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
""",
)

# This must be kept in sync with the top-level WORKSPACE file.
http_archive(
{openjdk19_linux_s390x_archive}
{openjdk20_linux_archive}
build_file_content = """
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
""",
)

http_archive(
{openjdk19_darwin_archive}
{openjdk20_darwin_archive}
build_file_content = """
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
""",
)

http_archive(
{openjdk19_darwin_aarch64_archive}
{openjdk20_darwin_aarch64_archive}
build_file_content = """
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
""",
)

http_archive(
{openjdk19_windows_archive}
{openjdk20_windows_archive}
build_file_content = """
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
Expand Down
20 changes: 9 additions & 11 deletions src/test/shell/testenv.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,10 @@ EOF
"openjdk17_linux_s390x_archive"
"openjdk17_windows_archive"
"openjdk17_windows_arm64_archive"
"openjdk19_darwin_archive"
"openjdk19_darwin_aarch64_archive"
"openjdk19_linux_archive"
"openjdk19_linux_s390x_archive"
"openjdk19_windows_archive"
"openjdk20_darwin_archive"
"openjdk20_darwin_aarch64_archive"
"openjdk20_linux_archive"
"openjdk20_windows_archive"
"remote_coverage_tools"
"remote_java_tools_for_testing"
"remote_java_tools_darwin_x86_64_for_testing"
Expand All @@ -318,12 +317,11 @@ EOF
"remotejdk17_macos_aarch64_for_testing"
"remotejdk17_win_for_testing"
"remotejdk17_win_arm64_for_testing"
"remotejdk19_linux_for_testing"
"remotejdk19_linux_s390x_for_testing"
"remotejdk19_macos_for_testing"
"remotejdk19_macos_aarch64_for_testing"
"remotejdk19_win_for_testing"
"remotejdk19_win_arm64_for_testing"
"remotejdk20_linux_for_testing"
"remotejdk20_macos_for_testing"
"remotejdk20_macos_aarch64_for_testing"
"remotejdk20_win_for_testing"
"remotejdk20_win_arm64_for_testing"
"rules_cc"
"rules_java"
"rules_license"
Expand Down
Loading

0 comments on commit 0e8e611

Please sign in to comment.