Skip to content

Commit

Permalink
Update rules_java and remove references to "remote_java_tools_darwin"
Browse files Browse the repository at this point in the history
This is the last step of bazelbuild#17780

This updates rules_java to v5.5.0 for bazel and bazel_tools and cleans up any remaining references to remote_java_tools_darwin,  remote_java_tools_test_darwin, and remote_java_tools_darwin_for_testing

Closes bazelbuild#17843.

PiperOrigin-RevId: 519059189
Change-Id: Ic04f3a2e5cc12e6b7731f6d8a3551553e172e000
  • Loading branch information
hvadehra authored and fweikert committed May 25, 2023
1 parent 1426aa1 commit a14237d
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 41 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bazel_dep(name = "stardoc", version = "0.5.3", repo_name = "io_bazel_skydoc")
bazel_dep(name = "zstd-jni", version = "1.5.2-3")
bazel_dep(name = "zlib", version = "1.2.13")
bazel_dep(name = "rules_cc", version = "0.0.6")
bazel_dep(name = "rules_java", version = "5.4.1")
bazel_dep(name = "rules_java", version = "5.5.0")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
bazel_dep(name = "rules_jvm_external", version = "4.5")
bazel_dep(name = "rules_python", version = "0.19.0")
Expand Down
14 changes: 0 additions & 14 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -428,13 +428,6 @@ dist_http_archive(
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
)

# Used in src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE.
dist_http_archive(
name = "remote_java_tools_darwin_for_testing",
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
)

# Used in src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE.
dist_http_archive(
name = "remote_java_tools_darwin_x86_64_for_testing",
Expand Down Expand Up @@ -470,13 +463,6 @@ dist_http_archive(
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
)

# Used in src/test/shell/bazel/testdata/jdk_http_archives.
dist_http_archive(
name = "remote_java_tools_test_darwin",
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
)

# Used in src/test/shell/bazel/testdata/jdk_http_archives.
dist_http_archive(
name = "remote_java_tools_test_darwin_x86_64",
Expand Down
3 changes: 0 additions & 3 deletions distdir_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,7 @@ DIST_DEPS = {
},
"remote_java_tools_darwin_x86_64": {
"aliases": [
"remote_java_tools_darwin",
"remote_java_tools_test_darwin",
"remote_java_tools_test_darwin_x86_64",
"remote_java_tools_darwin_for_testing",
"remote_java_tools_darwin_x86_64_for_testing",
],
"archive": "java_tools_darwin_x86_64-v12.0.zip",
Expand Down
2 changes: 0 additions & 2 deletions src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -564,13 +564,11 @@ filegroup(
"@bazel_skylib//:WORKSPACE",
"@com_google_protobuf//:WORKSPACE",
"@remote_coverage_tools//:WORKSPACE",
"@remote_java_tools_darwin_for_testing//:WORKSPACE",
"@remote_java_tools_darwin_x86_64_for_testing//:WORKSPACE",
"@remote_java_tools_darwin_arm64_for_testing//:WORKSPACE",
"@remote_java_tools_for_testing//:WORKSPACE",
"@remote_java_tools_linux_for_testing//:WORKSPACE",
"@remote_java_tools_test//:WORKSPACE",
"@remote_java_tools_test_darwin//:WORKSPACE",
"@remote_java_tools_test_darwin_x86_64//:WORKSPACE",
"@remote_java_tools_test_darwin_arm64//:WORKSPACE",
"@remote_java_tools_test_linux//:WORKSPACE",
Expand Down
5 changes: 3 additions & 2 deletions src/MODULE.tools
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module(name = "bazel_tools")

bazel_dep(name = "rules_cc", version = "0.0.6")
bazel_dep(name = "rules_java", version = "5.4.1")
bazel_dep(name = "rules_java", version = "5.5.0")
bazel_dep(name = "rules_license", version = "0.0.3")
bazel_dep(name = "rules_proto", version = "4.0.0")
bazel_dep(name = "rules_python", version = "0.4.0")
Expand All @@ -24,7 +24,8 @@ use_repo(
"remote_java_tools",
"remote_java_tools_linux",
"remote_java_tools_windows",
"remote_java_tools_darwin",
"remote_java_tools_darwin_x86_64",
"remote_java_tools_darwin_arm64",
)

sh_configure_extension = use_extension("//tools/sh:sh_configure.bzl", "sh_configure_extension")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ gen_workspace_stanza(
"remote_java_tools",
"remote_java_tools_linux",
"remote_java_tools_windows",
"remote_java_tools_darwin",
"remote_java_tools_darwin_x86_64",
"remote_java_tools_darwin_arm64",
"rules_cc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,6 @@ maybe(
{remote_java_tools_windows}
)

maybe(
http_archive,
{remote_java_tools_darwin}
)

maybe(
http_archive,
{remote_java_tools_darwin_x86_64}
Expand Down
1 change: 0 additions & 1 deletion src/test/py/bazel/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class TestBase(unittest.TestCase):
'remotejdk19_macos_aarch64_for_testing',
'remotejdk19_win_for_testing',
'remote_java_tools_for_testing',
'remote_java_tools_darwin_for_testing',
'remote_java_tools_darwin_x86_64_for_testing',
'remote_java_tools_darwin_arm64_for_testing',
'remote_java_tools_linux_for_testing',
Expand Down
9 changes: 7 additions & 2 deletions src/test/shell/bazel/bazel_coverage_java_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ if [[ "${JAVA_TOOLS_PREBUILT_ZIP}" != "released" ]]; then
inplace-sed "/override_repository=remote_java_tools=/d" "$TEST_TMPDIR/bazelrc"
inplace-sed "/override_repository=remote_java_tools_linux=/d" "$TEST_TMPDIR/bazelrc"
inplace-sed "/override_repository=remote_java_tools_windows=/d" "$TEST_TMPDIR/bazelrc"
inplace-sed "/override_repository=remote_java_tools_darwin=/d" "$TEST_TMPDIR/bazelrc"
inplace-sed "/override_repository=remote_java_tools_darwin_x86_64=/d" "$TEST_TMPDIR/bazelrc"
inplace-sed "/override_repository=remote_java_tools_darwin_arm64=/d" "$TEST_TMPDIR/bazelrc"
fi
JAVA_TOOLS_PREBUILT_ZIP_FILE_URL=${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL:-}

Expand Down Expand Up @@ -80,7 +81,11 @@ http_archive(
urls = ["${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL}"]
)
http_archive(
name = "remote_java_tools_darwin",
name = "remote_java_tools_darwin_x86_64",
urls = ["${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL}"]
)
http_archive(
name = "remote_java_tools_darwin_arm64",
urls = ["${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL}"]
)
EOF
Expand Down
6 changes: 5 additions & 1 deletion src/test/shell/bazel/bazel_java17_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ http_archive(
urls = ["${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL}"]
)
http_archive(
name = "remote_java_tools_darwin",
name = "remote_java_tools_darwin_x86_64",
urls = ["${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL}"]
)
http_archive(
name = "remote_java_tools_darwin_arm64",
urls = ["${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL}"]
)
EOF
Expand Down
9 changes: 7 additions & 2 deletions src/test/shell/bazel/bazel_java_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ if [[ "${JAVA_TOOLS_PREBUILT_ZIP}" != "released" ]]; then
inplace-sed "/override_repository=remote_java_tools=/d" "$TEST_TMPDIR/bazelrc"
inplace-sed "/override_repository=remote_java_tools_linux=/d" "$TEST_TMPDIR/bazelrc"
inplace-sed "/override_repository=remote_java_tools_windows=/d" "$TEST_TMPDIR/bazelrc"
inplace-sed "/override_repository=remote_java_tools_darwin=/d" "$TEST_TMPDIR/bazelrc"
inplace-sed "/override_repository=remote_java_tools_darwin_x86_64=/d" "$TEST_TMPDIR/bazelrc"
inplace-sed "/override_repository=remote_java_tools_darwin_arm64=/d" "$TEST_TMPDIR/bazelrc"
fi
JAVA_TOOLS_PREBUILT_ZIP_FILE_URL=${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL:-}

Expand Down Expand Up @@ -129,7 +130,11 @@ http_archive(
urls = ["${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL}"]
)
http_archive(
name = "remote_java_tools_darwin",
name = "remote_java_tools_darwin_x86_64",
urls = ["${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL}"]
)
http_archive(
name = "remote_java_tools_darwin_arm64",
urls = ["${JAVA_TOOLS_PREBUILT_ZIP_FILE_URL}"]
)
EOF
Expand Down
1 change: 0 additions & 1 deletion src/test/shell/bazel/testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ gen_workspace_stanza(
"remote_java_tools_test",
"remote_java_tools_test_linux",
"remote_java_tools_test_windows",
"remote_java_tools_test_darwin",
"remote_java_tools_test_darwin_x86_64",
"remote_java_tools_test_darwin_arm64",
"openjdk11_linux_archive",
Expand Down
4 changes: 0 additions & 4 deletions src/test/shell/bazel/testdata/jdk_http_archives.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ http_archive(
{remote_java_tools_test_windows}
)

http_archive(
{remote_java_tools_test_darwin}
)

http_archive(
{remote_java_tools_test_darwin_x86_64}
)
Expand Down
2 changes: 0 additions & 2 deletions src/test/shell/testenv.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,9 @@ EOF
"openjdk19_windows_archive"
"remote_coverage_tools"
"remote_java_tools_for_testing"
"remote_java_tools_darwin_for_testing"
"remote_java_tools_darwin_x86_64_for_testing"
"remote_java_tools_darwin_arm64_for_testing"
"remote_java_tools_test"
"remote_java_tools_test_darwin"
"remote_java_tools_test_darwin_x86_64"
"remote_java_tools_test_darwin_arm64"
"remote_java_tools_test_linux"
Expand Down

0 comments on commit a14237d

Please sign in to comment.