From b079a77cee860e93abbdf595c5f71d5d721cbeb9 Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 14 Feb 2024 06:19:00 -0800 Subject: [PATCH] Fix googleapis and remoteapis sources in bootstrap distfile Previously, their sources are included as external repos and mapped to third_party, after this change, their sources are directly included under the third_party directory. This change is needed because https://github.com/bazelbuild/bazel/commit/a54a393d209ab9c8cf5e80b2a0ef092196c17df3 broke the mapping mechanism which depends on the canonical repository name. Fixes //src/test/shell/bazel:bazel_bootstrap_distfile_tar_test with Bazel@HEAD and Bazel@7.1 https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3657#018da594-e743-44da-8f76-782a8e5c86b1 Related https://github.com/bazelbuild/bazel/issues/21292 PiperOrigin-RevId: 606960533 Change-Id: Ia4a81d5730e04964bc06c8f8ee2685364ce8623b --- BUILD | 3 --- third_party/BUILD | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/BUILD b/BUILD index 9c9f148e07012a..1c0ce05a9a3303 100644 --- a/BUILD +++ b/BUILD @@ -164,9 +164,6 @@ pkg_tar( remap_paths = { "MODULE.bazel.lock.dist": "MODULE.bazel.lock", "WORKSPACE.bzlmod.filtered": "WORKSPACE.bzlmod", - # Rewrite paths coming from local repositories back into third_party. - "external/googleapis~override": "third_party/googleapis", - "external/remoteapis~override": "third_party/remoteapis", }, strip_prefix = ".", # Public but bazel-only visibility. diff --git a/third_party/BUILD b/third_party/BUILD index b43e26c00bb96b..35a244fc010e50 100644 --- a/third_party/BUILD +++ b/third_party/BUILD @@ -12,6 +12,7 @@ filegroup( "//third_party/android_dex:srcs", "//third_party/cncf_udpa:srcs", "//third_party/def_parser:srcs", + "//third_party/googleapis:srcs", "//third_party/grpc:srcs", "//third_party/grpc-java:srcs", "//third_party/ijar:srcs", @@ -33,9 +34,8 @@ filegroup( "//third_party/py/frozendict:srcs", "//third_party/py/mock:srcs", "//third_party/py/six:srcs", + "//third_party/remoteapis:srcs", "//third_party/zlib:srcs", - "@googleapis//:srcs", - "@remoteapis//:srcs", ], )