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

Depend on @bazel_tools//third_party/ijar:zip from java_tools #8945

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
6 changes: 0 additions & 6 deletions src/test/shell/bazel/bazel_java_tools_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ EOF
}

function test_java_tools_singlejar_builds() {
if "$is_windows"; then
echo "Skipping test on Windows." && return
fi
local java_tools_rlocation=$(rlocation io_bazel/src/java_tools_${JAVA_TOOLS_JAVA_VERSION}.zip)
local java_tools_zip_file_url="file://${java_tools_rlocation}"
if "$is_windows"; then
Expand All @@ -209,9 +206,6 @@ EOF
}

function test_java_tools_ijar_builds() {
if "$is_windows"; then
echo "Skipping test on Windows." && return
fi
local java_tools_rlocation=$(rlocation io_bazel/src/java_tools_${JAVA_TOOLS_JAVA_VERSION}.zip)
local java_tools_zip_file_url="file://${java_tools_rlocation}"
if "$is_windows"; then
Expand Down
5 changes: 5 additions & 0 deletions third_party/ijar/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ cc_library(
"//src:__subpackages__",
"//third_party/ijar:__subpackages__",
"//tools/test:__pkg__",
# TODO(bazel-team): Move this target out of @bazel_tools
"@local_java_tools//:__pkg__",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is enough. It's enough for the tests to pass. The remote repo names in the workspace suffix are "remote_java_tools_linux", "remote_java_tools_windows" and "remote_java_tools_darwin". Can you please add them as well? Also add a TODO to migrate this target out of bazel_tools.

"@remote_java_tools_linux//:__pkg__",
"@remote_java_tools_darwin//:__pkg__",
"@remote_java_tools_windows//:__pkg__",
],
deps = [
":platform_utils",
Expand Down
40 changes: 3 additions & 37 deletions tools/jdk/BUILD.java_tools
Original file line number Diff line number Diff line change
Expand Up @@ -347,41 +347,7 @@ cc_binary(
"java_tools/ijar/classfile.cc",
"java_tools/ijar/ijar.cc",
],
deps = [":zip"],
)

cc_library(
name = "zip",
srcs = [
"java_tools/ijar/zip.cc",
] + select({
":windows": [
"java_tools/ijar/mapped_file_windows.cc",
],
"//conditions:default": [
"java_tools/ijar/mapped_file_unix.cc",
],
}),
hdrs = [
"java_tools/ijar/common.h",
"java_tools/ijar/mapped_file.h",
"java_tools/ijar/zip.h",
],
include_prefix = "third_party",
strip_include_prefix = "java_tools",
deps = [
":platform_utils",
":zlib_client",
] + select({
":windows": [
":errors",
":filesystem",
":logging",
":strings",
],
"//conditions:default": [
],
}),
deps = ["@bazel_tools//third_party/ijar:zip"],
)

cc_library(
Expand Down Expand Up @@ -659,9 +625,9 @@ cc_library(
strip_include_prefix = "java_tools",
visibility = ["//visibility:private"],
deps = [
":cpp_util",
":diag",
":singlejar_port",
"@bazel_tools//src/main/cpp/util",
],
)

Expand Down Expand Up @@ -706,13 +672,13 @@ cc_library(
strip_include_prefix = "java_tools",
deps = [
":combiners",
":cpp_util",
":diag",
":input_jar",
":mapped_file",
":options",
":singlejar_port",
"//java_tools/zlib",
"@bazel_tools//src/main/cpp/util",
],
)

Expand Down