Skip to content

Commit a3f2b91

Browse files
laramielcopybara-github
authored andcommitted
Split third_party/local_proto_mirror into separate repositories.
At present local_proto_mirror is a grab-bag of separate repositories, however in preparing for bazel 9 modules, some of these need to be exposed under different names, and we may use some from the bcr, so splitting it into per-repository local overrides makes sense. local_googleapis_imports imports.bzl local_protoc_gen_validate validate/validate.proto bazel/pgv_proto_library.bzl local_rules_go: proto/def.bzl proto/compiler.bzl go/def.bzl local_opencensus_proto: opencensus/proto/resource/v1/resource.proto opencensus/proto/trace/v1/trace.proto opencensus/proto/trace/v1/trace_config.proto PiperOrigin-RevId: 892465371 Change-Id: I0e615f9ecb994897ac61efc5161416c91b7b3414
1 parent d46691a commit a3f2b91

29 files changed

Lines changed: 188 additions & 90 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ bazel_to_cmake(
103103
"--include-package="
104104
"--include-package=tensorstore/**"
105105
"--exclude-package=tensorstore/examples/python/**"
106-
"--exclude-package=third_party/local_proto_mirror/**"
106+
"--exclude-package=third_party/local_googleapis_imports/**"
107+
"--exclude-package=third_party/local_opencensus_proto/**"
108+
"--exclude-package=third_party/local_protoc_gen_validate/**"
109+
"--exclude-package=third_party/local_rules_go/**"
107110
--ignore-library "//bazel/repo_rules:local_python_runtime.bzl"
108111
--ignore-library "//docs:doctest.bzl"
109112
--ignore-library "//bazel:non_compile.bzl"

third_party/cel_spec/workspace.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def repo():
3131
strip_prefix = "cel-spec-0.25.1",
3232
urls = mirror_url("https://github.com/google/cel-spec/archive/v0.25.1.zip"),
3333
repo_mapping = {
34-
"@io_bazel_rules_go": "@local_proto_mirror",
34+
"@io_bazel_rules_go": "@local_rules_go",
3535
"@com_google_googleapis": "@googleapis",
3636
},
3737
cmake_name = "cel-spec",

third_party/envoy_api/workspace.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def repo():
2929
sha256 = "a9f1eb76c8e8153ec81ce04403c8829b42786060b7bb1dcc91b597220b71eaf6",
3030
strip_prefix = "data-plane-api-d9c5e84658eef279e9a021ff0517f8f8ee35d79a",
3131
repo_mapping = {
32-
"@com_envoyproxy_protoc_gen_validate": "@local_proto_mirror",
33-
"@io_bazel_rules_go": "@local_proto_mirror",
34-
"@opencensus_proto": "@local_proto_mirror",
32+
"@com_envoyproxy_protoc_gen_validate": "@local_protoc_gen_validate",
33+
"@io_bazel_rules_go": "@local_rules_go",
34+
"@opencensus_proto": "@local_opencensus_proto",
3535
"@com_github_cncf_xds": "@xds",
3636
"@com_google_googleapis": "@googleapis",
3737
"@com_github_grpc_grpc": "@grpc",

third_party/googleapis/workspace.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def repo():
3030
urls = mirror_url("https://github.com/googleapis/googleapis/archive/1937a1552cb031159749738f6d062f084ea94894.tar.gz"), # master(2026-02-18)
3131
sha256 = "164641dfc31c148742f055ab8b7a07efd39862b4cd2e6fa35b5f498a30ee07bb",
3232
repo_mapping = {
33-
"@com_google_googleapis_imports": "@local_proto_mirror",
33+
"@com_google_googleapis_imports": "@local_googleapis_imports",
3434
"@com_google_protobuf_upb": "@com_google_protobuf",
3535
},
3636
cmake_name = "Googleapis",

third_party/grpc/workspace.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def repo():
4545
"@com_google_googletest": "@googletest",
4646
"@com_googlesource_code_re2": "@re2",
4747
"@com_github_grpc_grpc": "@grpc",
48-
"@io_bazel_rules_go": "@local_proto_mirror",
48+
"@io_bazel_rules_go": "@local_rules_go",
4949
},
5050
cmake_name = "gRPC",
5151
# We currently use grpc++_test, which is not public. Fix that, test, and enable.
File renamed without changes.
File renamed without changes.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2026 The TensorStore Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""
16+
Local copies of googleapis_imports files, used by gRPC.
17+
"""
18+
19+
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
20+
load("//bazel:local_mirror.bzl", "local_mirror")
21+
22+
def repo():
23+
maybe(
24+
local_mirror,
25+
name = "local_googleapis_imports",
26+
file_symlink = {
27+
"BUILD.bazel": "//third_party:local_googleapis_imports/src/lpm.BUILD.bazel",
28+
"imports.bzl": "//third_party:local_googleapis_imports/src/imports.bzl",
29+
},
30+
cmake_name = "googleapis_imports",
31+
bazel_to_cmake = {},
32+
)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package(default_visibility = ["//visibility:public"])
2+
3+
licenses(["notice"])
4+
5+
exports_files(glob(["*.bzl"]))

third_party/local_proto_mirror/src/opencensus/proto/resource/v1/lpm.BUILD.bazel renamed to third_party/local_opencensus_proto/src/opencensus/proto/resource/v1/lpm.BUILD.bazel

File renamed without changes.

0 commit comments

Comments
 (0)