Skip to content

Commit b0150c0

Browse files
protobuf-github-bottonyliaoss
authored andcommitted
Fix breaking change related to upb_c_proto_library and upb_proto_reflection_library
These are referenced externally by googleapis, cel-spec, and likely soon grpc. A recent change moved them and made the moved rules private. We add a temporary shim at `//bazel:upb_c_proto_library.bzl` to unbreak googleapis and cel-spec. We also make the moved `upb_c_proto_library` and `upb_proto_reflection_library` rules public. PiperOrigin-RevId: 863339202
1 parent e9d6bcb commit b0150c0

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

bazel/BUILD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ bzl_library(
4545
],
4646
)
4747

48+
bzl_library(
49+
name = "upb_c_proto_library_bzl",
50+
srcs = ["upb_c_proto_library.bzl"],
51+
deprecation = "Use upb/bazel:upb_proto_library_bzl instead",
52+
visibility = ["//visibility:public"],
53+
deps = ["//upb/bazel:upb_proto_library_bzl"],
54+
)
55+
4856
bzl_library(
4957
name = "proto_descriptor_set_bzl",
5058
srcs = ["proto_descriptor_set.bzl"],
@@ -61,6 +69,7 @@ filegroup(
6169
":java_lite_proto_library_bzl",
6270
":proto_library_bzl",
6371
":py_proto_library_bzl",
72+
":upb_c_proto_library_bzl",
6473
"//bazel/common:for_bazel_tests",
6574
"//bazel/flags:for_bazel_tests",
6675
"//bazel/toolchains:for_bazel_tests",

bazel/upb_c_proto_library.bzl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2026, Google LLC
2+
# All rights reserved.
3+
#
4+
# Use of this source code is governed by a BSD-style
5+
# license that can be found in the LICENSE file or at
6+
# https://developers.google.com/open-source/licenses/bsd
7+
8+
# This is a temporary shim to unbreak cel-spec and googleapis which referenced this file. At some
9+
# point in the future we can remove this once both are updated.
10+
11+
"""upb_c_proto_library rule"""
12+
13+
load("//upb/bazel:upb_c_proto_library.bzl", _upb_c_proto_library = "upb_c_proto_library")
14+
15+
upb_c_proto_library = _upb_c_proto_library

upb/bazel/upb_c_proto_library.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ load("//upb/bazel/private:upb_proto_library_internal/aspect.bzl", "upb_proto_asp
88
load("//upb/bazel/private:upb_proto_library_internal/cc_library_func.bzl", "upb_use_cpp_toolchain")
99
load("//upb/bazel/private:upb_proto_library_internal/rule.bzl", "upb_proto_rule_impl")
1010

11-
visibility(upb_clients)
12-
1311
UpbWrappedCcInfo = provider(
1412
"Provider for cc_info for protos",
1513
fields = ["cc_info"],

upb/bazel/upb_proto_reflection_library.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ load("//upb/bazel/private:upb_proto_library_internal/aspect.bzl", "upb_proto_asp
99
load("//upb/bazel/private:upb_proto_library_internal/cc_library_func.bzl", "upb_use_cpp_toolchain")
1010
load("//upb/bazel/private:upb_proto_library_internal/rule.bzl", "upb_proto_rule_impl")
1111

12-
visibility(upb_clients)
13-
1412
_UpbDefsWrappedCcInfo = provider("Provider for cc_info for protos", fields = ["cc_info"])
1513

1614
_WrappedDefsGeneratedSrcsInfo = provider(

0 commit comments

Comments
 (0)