Skip to content

Commit 1e2c5e6

Browse files
philwocopybara-github
authored andcommitted
Remove Java 12 support
Java 12 is end-of-life and there's no point in investing work to maintain it. Note that this doesn't actively remove any kind of support - people can still use `java_tools_javac12` in their WORKSPACE file and use their own OpenJDK 12 version as the host_javabase and it will continue to work just as before. It just means we no longer test changes against it, release new java_tools versions for it and no longer provide bundled `http_archive` definitions for OpenJDK 12 (which is the right thing to do, as we don't want to point our users to unmaintained OpenJDK versions that might eventually be found to contain security issues). Closes #11666. PiperOrigin-RevId: 318824088
1 parent d70ae33 commit 1e2c5e6

File tree

7 files changed

+3
-295
lines changed

7 files changed

+3
-295
lines changed

WORKSPACE

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -701,14 +701,6 @@ http_archive(
701701
],
702702
)
703703

704-
http_archive(
705-
name = "java_tools_langtools_javac12",
706-
sha256 = "99b107105165a91df82cd7cf82a8efb930d803fb7de1663cf7f780142104cd14",
707-
urls = [
708-
"https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk12.zip",
709-
],
710-
)
711-
712704
# This must be kept in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_remote_tools.WORKSPACE
713705
http_archive(
714706
name = "android_tools_for_testing",
@@ -856,37 +848,6 @@ http_archive(
856848
],
857849
)
858850

859-
# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
860-
http_archive(
861-
name = "remote_java_tools_javac12_test_linux",
862-
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
863-
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
864-
sha256 = "3997ee9a57b095748f1c0d084839fab2fbc72504aeb7b37b1f71c31738d330e3",
865-
urls = ["https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_linux-v3.0.zip"],
866-
)
867-
868-
# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
869-
http_archive(
870-
name = "remote_java_tools_javac12_test_windows",
871-
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
872-
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
873-
sha256 = "cfad1718dad1fed12816748eed27ab30b9ea1268c8ce9940acf3b5b7d82d483d",
874-
urls = [
875-
"https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_windows-v3.0.zip",
876-
],
877-
)
878-
879-
# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
880-
http_archive(
881-
name = "remote_java_tools_javac12_test_darwin",
882-
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
883-
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
884-
sha256 = "54df966e7583bafe659e39b4103a4ce934201d969de638d071ada07d8e0c1a3a",
885-
urls = [
886-
"https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_darwin-v3.0.zip",
887-
],
888-
)
889-
890851
# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
891852
http_archive(
892853
name = "openjdk11_linux_archive",
@@ -923,42 +884,6 @@ exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
923884
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"],
924885
)
925886

926-
# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
927-
http_archive(
928-
name = "openjdk12_linux_archive",
929-
build_file_content = """
930-
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
931-
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
932-
""",
933-
sha256 = "529c99841d69e11a85aea967ccfb9d0fd40b98c5b68dbe1d059002655e0a9c13",
934-
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-linux_x64",
935-
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz"],
936-
)
937-
938-
# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
939-
http_archive(
940-
name = "openjdk12_darwin_archive",
941-
build_file_content = """
942-
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
943-
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
944-
""",
945-
sha256 = "67ca9d285056132ebb19fa237a14affda52132142e1171fe1c20e18974b3b8a5",
946-
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-macosx_x64",
947-
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-macosx_x64.tar.gz"],
948-
)
949-
950-
# This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives.
951-
http_archive(
952-
name = "openjdk12_windows_archive",
953-
build_file_content = """
954-
java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])
955-
exports_files(["WORKSPACE"], visibility = ["//visibility:public"])
956-
""",
957-
sha256 = "cf28404c23c3aa1115363ba6e796c30580a768e1d7d6681a7d053e516008e00d",
958-
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-win_x64",
959-
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-win_x64.zip"],
960-
)
961-
962887
load("@io_bazel_skydoc//:setup.bzl", "stardoc_repositories")
963888

964889
stardoc_repositories()

src/BUILD

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ JAVA_TOOLS_DEPLOY_JARS = [
567567
"//conditions:default": [],
568568
})
569569

570-
JAVA_VERSIONS = ("11", "12")
570+
JAVA_VERSIONS = ("11",)
571571

572572
[
573573
genrule(
@@ -744,9 +744,6 @@ filegroup(
744744
"@openjdk11_darwin_archive//:WORKSPACE",
745745
"@openjdk11_linux_archive//:WORKSPACE",
746746
"@openjdk11_windows_archive//:WORKSPACE",
747-
"@openjdk12_darwin_archive//:WORKSPACE",
748-
"@openjdk12_linux_archive//:WORKSPACE",
749-
"@openjdk12_windows_archive//:WORKSPACE",
750747
"@openjdk_linux_aarch64_minimal//file",
751748
"@openjdk_linux_minimal//file",
752749
"@openjdk_macos_minimal//file",
@@ -756,9 +753,6 @@ filegroup(
756753
"@remote_java_tools_javac11_test_darwin//:WORKSPACE",
757754
"@remote_java_tools_javac11_test_linux//:WORKSPACE",
758755
"@remote_java_tools_javac11_test_windows//:WORKSPACE",
759-
"@remote_java_tools_javac12_test_darwin//:WORKSPACE",
760-
"@remote_java_tools_javac12_test_linux//:WORKSPACE",
761-
"@remote_java_tools_javac12_test_windows//:WORKSPACE",
762756
"@remote_java_tools_linux_for_testing//:WORKSPACE",
763757
"@remote_java_tools_windows_for_testing//:WORKSPACE",
764758
"@remotejdk11_linux_aarch64_for_testing//:WORKSPACE",

src/test/shell/bazel/BUILD

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -178,29 +178,6 @@ sh_test(
178178
],
179179
)
180180

181-
sh_test(
182-
name = "bazel_java12_test",
183-
srcs = ["bazel_java12_test.sh"],
184-
args = [
185-
# --java_toolchain and --host_java_toolchain values
186-
"@local_java_tools//:toolchain_jdk_12",
187-
# java_tools zip to test
188-
"src/java_tools_java12.zip",
189-
] + select({
190-
# --javabase and --host_javabase values
191-
"//src/conditions:darwin": ["@openjdk12_darwin_archive//:runtime"],
192-
"//src/conditions:darwin_x86_64": ["@openjdk12_darwin_archive//:runtime"],
193-
"//src/conditions:windows": ["@openjdk12_windows_archive//:runtime"],
194-
"//src/conditions:linux_x86_64": ["@openjdk12_linux_archive//:runtime"],
195-
}),
196-
data = [
197-
":test-deps",
198-
"//src:java_tools_java12_zip",
199-
"//src/test/shell/bazel/testdata:jdk_http_archives_filegroup",
200-
"@bazel_tools//tools/bash/runfiles",
201-
],
202-
)
203-
204181
sh_test(
205182
name = "bazel_java_test",
206183
# TODO(iirina): Investigate if the 'large' and 'eternal' values still apply.
@@ -219,7 +196,7 @@ sh_test(
219196
exec_compatible_with = ["//:highcpu_machine"],
220197
)
221198

222-
JAVA_VERSIONS = ("11", "12")
199+
JAVA_VERSIONS = ("11",)
223200

224201
[
225202
sh_test(

src/test/shell/bazel/bazel_java12_test.sh

Lines changed: 0 additions & 132 deletions
This file was deleted.

src/test/shell/bazel/testdata/jdk_http_archives

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,6 @@ http_archive(
2424
],
2525
)
2626

27-
################### Remote java_tools with embedded javac 12 ###################
28-
# This must be kept in sync with the top-level WORKSPACE file.
29-
http_archive(
30-
name = "remote_java_tools_javac12_test_linux",
31-
sha256 = "3997ee9a57b095748f1c0d084839fab2fbc72504aeb7b37b1f71c31738d330e3",
32-
urls = ["https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_linux-v3.0.zip"],
33-
)
34-
# This must be kept in sync with the top-level WORKSPACE file.
35-
http_archive(
36-
name = "remote_java_tools_javac12_test_windows",
37-
sha256 = "cfad1718dad1fed12816748eed27ab30b9ea1268c8ce9940acf3b5b7d82d483d",
38-
urls = [
39-
"https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_windows-v3.0.zip",
40-
],
41-
)
42-
# This must be kept in sync with the top-level WORKSPACE file.
43-
http_archive(
44-
name = "remote_java_tools_javac12_test_darwin",
45-
sha256 = "54df966e7583bafe659e39b4103a4ce934201d969de638d071ada07d8e0c1a3a",
46-
urls = [
47-
"https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_darwin-v3.0.zip",
48-
],
49-
)
50-
5127
#################################### JDK 11 ####################################
5228
# This must be kept in sync with the top-level WORKSPACE file.
5329
http_archive(
@@ -73,29 +49,3 @@ http_archive(
7349
strip_prefix = "zulu11.37.17-ca-jdk11.0.6-win_x64",
7450
urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"],
7551
)
76-
77-
#################################### JDK 12 ####################################
78-
# This must be kept in sync with the top-level WORKSPACE file.
79-
http_archive(
80-
name = "openjdk12_linux_archive",
81-
build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])",
82-
sha256 = "529c99841d69e11a85aea967ccfb9d0fd40b98c5b68dbe1d059002655e0a9c13",
83-
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-linux_x64",
84-
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz"],
85-
)
86-
# This must be kept in sync with the top-level WORKSPACE file.
87-
http_archive(
88-
name = "openjdk12_darwin_archive",
89-
build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])",
90-
sha256 = "67ca9d285056132ebb19fa237a14affda52132142e1171fe1c20e18974b3b8a5",
91-
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-macosx_x64",
92-
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-macosx_x64.tar.gz"],
93-
)
94-
# This must be kept in sync with the top-level WORKSPACE file.
95-
http_archive(
96-
name = "openjdk12_windows_archive",
97-
build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])",
98-
sha256 = "cf28404c23c3aa1115363ba6e796c30580a768e1d7d6681a7d053e516008e00d",
99-
strip_prefix = "zulu12.2.3-ca-jdk12.0.1-win_x64",
100-
urls = ["https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-win_x64.zip"],
101-
)

src/test/shell/testenv.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,6 @@ EOF
280280
"openjdk11_darwin_archive"
281281
"openjdk11_linux_archive"
282282
"openjdk11_windows_archive"
283-
"openjdk12_darwin_archive"
284-
"openjdk12_linux_archive"
285-
"openjdk12_windows_archive"
286283
"openjdk_linux_aarch64_minimal"
287284
"openjdk_linux_minimal"
288285
"openjdk_macos_minimal"
@@ -292,9 +289,6 @@ EOF
292289
"remote_java_tools_javac11_test_darwin"
293290
"remote_java_tools_javac11_test_linux"
294291
"remote_java_tools_javac11_test_windows"
295-
"remote_java_tools_javac12_test_darwin"
296-
"remote_java_tools_javac12_test_linux"
297-
"remote_java_tools_javac12_test_windows"
298292
"remote_java_tools_linux_for_testing"
299293
"remote_java_tools_windows_for_testing"
300294
"remotejdk11_linux_for_testing"

src/upload_all_java_tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bazel_version=$(bazel info release | cut -d' ' -f2)
4848

4949
# Passing the same commit_hash and timestamp to all targets to mark all the artifacts
5050
# uploaded on GCS with the same identifier.
51-
for java_version in 11 12; do
51+
for java_version in 11; do
5252

5353
bazel build //src:java_tools_java${java_version}_zip
5454
zip_path=${PWD}/bazel-bin/src/java_tools_java${java_version}.zip

0 commit comments

Comments
 (0)