From f5d8f8c79358852feab1305078e6c4349b02a8f3 Mon Sep 17 00:00:00 2001 From: Yannic Bonenberger Date: Wed, 28 Oct 2020 13:32:06 +0100 Subject: [PATCH 1/2] Roll third_party/rules_proto 97d8af4dc474595af3900dd85cb3a29ad28cc313...7e4afce6fe62dbff0a4a03450143146f9f2d7488 https://github.com/bazelbuild/rules_proto/compare/97d8af4dc474595af3900dd85cb3a29ad28cc313...7e4afce6fe62dbff0a4a03450143146f9f2d7488 --- WORKSPACE | 28 +++++++++---------- .../build/lib/bazel/rules/java/jdk.WORKSPACE | 8 +++--- .../framework/BlackBoxTestEnvironment.java | 8 +++--- .../shell/bazel/bazel_proto_library_test.sh | 8 +++--- .../integration/modify_execution_info_test.sh | 8 +++--- src/test/shell/testenv.sh | 8 +++--- 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 855b9667a6cc7e..e2f6aa36827925 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -170,7 +170,7 @@ distdir_tar( # bazelbuild/rules_pkg "rules_pkg-0.2.4.tar.gz", # bazelbuild/rules_proto - "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", # protocolbuffers/protobuf "v3.13.0.tar.gz", # grpc/grpc @@ -211,7 +211,7 @@ distdir_tar( # bazelbuild/rules_pkg "rules_pkg-0.2.4.tar.gz": "4ba8f4ab0ff85f2484287ab06c0d871dcb31cc54d439457d28fd4ae14b18450a", # bazelbuild/rules_proto - "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz": "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + "7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz": "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", # protocolbuffers/protobuf "v3.13.0.tar.gz": "9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a", # grpc/grpc @@ -288,9 +288,9 @@ distdir_tar( "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz", ], # bazelbuild/rules_proto - "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz": [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", - "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", ], # protocolbuffers/protobuf "v3.13.0.tar.gz": [ @@ -535,11 +535,11 @@ http_archive( name = "rules_proto", patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, - sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", - strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", + sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", + strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", - "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", ], ) @@ -567,7 +567,7 @@ distdir_tar( # bazelbuild/rules_cc "8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip", # bazelbuild/rules_proto - "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", # protocolbuffers/protobuf "v3.13.0.tar.gz", # grpc/grpc @@ -601,7 +601,7 @@ distdir_tar( # bazelbuild/rules_cc "8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip": "1d4dbbd1e1e9b57d40bb0ade51c9e882da7658d5bfbf22bbd15b68e7879d761f", # bazelbuild/rules_proto - "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz": "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + "7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz": "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", # protocolbuffers/protobuf "v3.13.0.tar.gz": "9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a", # grpc/grpc @@ -648,9 +648,9 @@ distdir_tar( "https://github.com/bazelbuild/rules_cc/archive/8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip", ], # bazelbuild/rules_proto - "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz": [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", - "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz": [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", ], # protocolbuffers/protobuf "v3.13.0.tar.gz": [ diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE index a0fb5882345ba8..b0fbaf55487663 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE @@ -219,11 +219,11 @@ maybe( maybe( http_archive, "rules_proto", - sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", - strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", + sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", + strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", - "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", ], ) 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 1920af2c3b2161..d3638c88bdc51d 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 @@ -92,13 +92,13 @@ public static String getWorkspaceWithDefaultRepos() { ")", "http_archive(", " name = 'rules_proto',", - " sha256 = '602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208',", - " strip_prefix = 'rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313',", + " sha256 = '8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da',", + " strip_prefix = 'rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488',", " urls = [", " 'https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/" - + "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz',", + + "7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz',", " 'https://github.com/bazelbuild/rules_proto/archive/" - + "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz',", + + "7e4afce6fe62dbff0a4a03450143146f9f2d7488.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 6ff835ba84f5da..65e51db6041cbe 100755 --- a/src/test/shell/bazel/bazel_proto_library_test.sh +++ b/src/test/shell/bazel/bazel_proto_library_test.sh @@ -53,11 +53,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_proto", - strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", - sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", + sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", - "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", ], ) load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") diff --git a/src/test/shell/integration/modify_execution_info_test.sh b/src/test/shell/integration/modify_execution_info_test.sh index 0a061d3de1086a..d69ee995ea7137 100755 --- a/src/test/shell/integration/modify_execution_info_test.sh +++ b/src/test/shell/integration/modify_execution_info_test.sh @@ -155,11 +155,11 @@ function test_modify_execution_info_various_types() { cat >> WORKSPACE << EOF http_archive( name = "rules_proto", - strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", - sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", + sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", - "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", ], ) load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") diff --git a/src/test/shell/testenv.sh b/src/test/shell/testenv.sh index 6cc7f787a88fe2..8ab16b497f1543 100755 --- a/src/test/shell/testenv.sh +++ b/src/test/shell/testenv.sh @@ -544,11 +544,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_proto", - sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", - strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", + sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da", + strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", - "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz", ], ) EOF From 6f321b7f641bb9933d3932b94edb913ac3346216 Mon Sep 17 00:00:00 2001 From: Yannic Bonenberger Date: Wed, 28 Oct 2020 13:44:41 +0100 Subject: [PATCH 2/2] Load rules_python before rules_proto in tests rules_proto_dependencies() also loads rules_python --- .../shell/bazel/bazel_proto_library_test.sh | 20 +++++++++---------- .../integration/modify_execution_info_test.sh | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/test/shell/bazel/bazel_proto_library_test.sh b/src/test/shell/bazel/bazel_proto_library_test.sh index 65e51db6041cbe..05df5df7389ac4 100755 --- a/src/test/shell/bazel/bazel_proto_library_test.sh +++ b/src/test/shell/bazel/bazel_proto_library_test.sh @@ -49,6 +49,16 @@ function write_workspace() { fi cat >> "$workspace"WORKSPACE << EOF +# 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)", +) + load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( @@ -71,16 +81,6 @@ new_local_repository( 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/modify_execution_info_test.sh b/src/test/shell/integration/modify_execution_info_test.sh index d69ee995ea7137..6d31b21b21128f 100755 --- a/src/test/shell/integration/modify_execution_info_test.sh +++ b/src/test/shell/integration/modify_execution_info_test.sh @@ -153,6 +153,16 @@ function test_modify_execution_info_various_types() { if [[ "$PRODUCT_NAME" = "bazel" ]]; then # proto_library requires this external workspace. cat >> WORKSPACE << EOF +# 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)", +) + http_archive( name = "rules_proto", strip_prefix = "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488", @@ -173,16 +183,6 @@ new_local_repository( 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 fi local pkg="${FUNCNAME[0]}"