Update Protobuf to 3.11.3
Closes #10651.
PiperOrigin-RevId: 294910709
diff --git a/src/BUILD b/src/BUILD
index ce5cd0d..8e255be 100644
--- a/src/BUILD
+++ b/src/BUILD
@@ -726,6 +726,7 @@
name = "test_repos",
srcs = [
"@android_tools_for_testing//:WORKSPACE",
+ "@bazel_skylib//:WORKSPACE",
"@bazel_toolchains//:WORKSPACE",
"@com_google_protobuf//:WORKSPACE",
"@openjdk10_darwin_archive//:WORKSPACE",
diff --git a/src/test/java/com/google/devtools/build/lib/blackbox/framework/BlackBoxTestEnvironment.java b/src/test/java/com/google/devtools/build/lib/blackbox/framework/BlackBoxTestEnvironment.java
index d23cbdb..1920af2 100644
--- a/src/test/java/com/google/devtools/build/lib/blackbox/framework/BlackBoxTestEnvironment.java
+++ b/src/test/java/com/google/devtools/build/lib/blackbox/framework/BlackBoxTestEnvironment.java
@@ -96,9 +96,9 @@
" strip_prefix = 'rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313',",
" urls = [",
" 'https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/"
- + "97d8af4dc474595af3900dd85cb3a29ad28cc313.zip',",
+ + "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz',",
" 'https://github.com/bazelbuild/rules_proto/archive/"
- + "97d8af4dc474595af3900dd85cb3a29ad28cc313.zip',",
+ + "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz',",
" ],",
")");
}
diff --git a/src/test/shell/bazel/bazel_proto_library_test.sh b/src/test/shell/bazel/bazel_proto_library_test.sh
index 2ae7481..6ff835b 100755
--- a/src/test/shell/bazel/bazel_proto_library_test.sh
+++ b/src/test/shell/bazel/bazel_proto_library_test.sh
@@ -56,24 +56,30 @@
strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313",
sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208",
urls = [
- "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/97d8af4dc474595af3900dd85cb3a29ad28cc313.zip",
- "https://github.com/bazelbuild/rules_proto/97d8af4dc474595af3900dd85cb3a29ad28cc313.zip",
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
+ "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
-# java_lite_proto_library rules implicitly depend on @com_google_protobuf_javalite//:javalite_toolchain,
-# which is the JavaLite proto runtime (base classes and common utilities).
-http_archive(
- name = "com_google_protobuf_javalite",
- sha256 = "d8a2fed3708781196f92e1e7e7e713cf66804bd2944894401057214aff4f468e",
- strip_prefix = "protobuf-5e8916e881c573c5d83980197a6f783c132d4276",
- urls = [
- "https://mirror.bazel.build/github.com/google/protobuf/archive/5e8916e881c573c5d83980197a6f783c132d4276.zip",
- "https://github.com/google/protobuf/archive/5e8916e881c573c5d83980197a6f783c132d4276.zip",
- ],
+# @com_google_protobuf//:protoc depends on @io_bazel//third_party/zlib.
+new_local_repository(
+ name = "io_bazel",
+ path = "$(dirname $(rlocation io_bazel/third_party/rules_python/rules_python.WORKSPACE))/../..",
+ build_file_content = "# Intentionally left empty.",
+ workspace_file_content = "workspace(name = 'io_bazel')",
+)
+
+# TODO(#9029): May require some adjustment if/when we depend on the real
+# @rules_python in the real source tree, since this third_party/ package won't
+# be available.
+new_local_repository(
+ name = "rules_python",
+ path = "$(dirname $(rlocation io_bazel/third_party/rules_python/rules_python.WORKSPACE))",
+ build_file = "$(rlocation io_bazel/third_party/rules_python/BUILD)",
+ workspace_file = "$(rlocation io_bazel/third_party/rules_python/rules_python.WORKSPACE)",
)
EOF
}
diff --git a/src/test/shell/integration/BUILD b/src/test/shell/integration/BUILD
index 197d3fb..eeb3826 100644
--- a/src/test/shell/integration/BUILD
+++ b/src/test/shell/integration/BUILD
@@ -334,7 +334,6 @@
srcs = ["modify_execution_info_test.sh"],
data = [
":test-deps",
- "//third_party/protobuf/3.6.1:srcs",
"@bazel_tools//tools/bash/runfiles",
],
)
diff --git a/src/test/shell/integration/modify_execution_info_test.sh b/src/test/shell/integration/modify_execution_info_test.sh
index 17ea834..61b0ab5 100755
--- a/src/test/shell/integration/modify_execution_info_test.sh
+++ b/src/test/shell/integration/modify_execution_info_test.sh
@@ -153,10 +153,25 @@
if [[ "$PRODUCT_NAME" = "bazel" ]]; then
# proto_library requires this external workspace.
cat >> WORKSPACE << EOF
+http_archive(
+ name = "rules_proto",
+ strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313",
+ sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208",
+ urls = [
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
+ "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
+ ],
+)
+load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
+rules_proto_dependencies()
+rules_proto_toolchains()
+
+# @com_google_protobuf//:protoc depends on @io_bazel//third_party/zlib.
new_local_repository(
- name = "com_google_protobuf",
- path = "$(dirname $(rlocation io_bazel/third_party/protobuf/3.6.1/BUILD))",
- build_file = "$(rlocation io_bazel/third_party/protobuf/3.6.1/BUILD)",
+ name = "io_bazel",
+ path = "$(dirname $(rlocation io_bazel/third_party/rules_python/rules_python.WORKSPACE))/../..",
+ build_file_content = "# Intentionally left empty.",
+ workspace_file_content = "workspace(name = 'io_bazel')",
)
# TODO(#9029): May require some adjustment if/when we depend on the real
diff --git a/src/test/shell/testenv.sh b/src/test/shell/testenv.sh
index 7570363..808f92e 100755
--- a/src/test/shell/testenv.sh
+++ b/src/test/shell/testenv.sh
@@ -287,6 +287,7 @@
repos=(
"android_tools_for_testing"
+ "bazel_skylib"
"bazel_toolchains"
"com_google_protobuf"
"openjdk10_darwin_archive"