Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rules_java and remove references to "remote_java_tools_darwin" #17843

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
21 changes: 6 additions & 15 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 Expand Up @@ -740,7 +726,12 @@ maven_install(
"org.pcollections:pcollections:3.1.4",
"org.threeten:threeten-extra:1.5.0",
"org.tukaani:xz:1.9",
maven.artifact("com.google.guava", "guava-testlib", "31.1-jre", testonly = True),
maven.artifact(
hvadehra marked this conversation as resolved.
Show resolved Hide resolved
"com.google.guava",
"guava-testlib",
"31.1-jre",
testonly = True,
),
],
excluded_artifacts = [
# org.apache.httpcomponents and org.eclipse.jgit:org.eclipse.jgit
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 @@ -262,11 +262,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