Do not default to private visibility in rust_proto_library internal alias

PiperOrigin-RevId: 611607559
pull/16009/head
Marcel Hlopko 9 months ago committed by Copybara-Service
parent 7aac5538b4
commit 66ef7bc133
  1. 8
      rust/defs.bzl

@ -16,7 +16,7 @@ visibility([
"//rust/...",
])
def rust_proto_library(name, deps, visibility = [], **args):
def rust_proto_library(name, deps, **args):
"""Declares all the boilerplate needed to use Rust protobufs conveniently.
Hopefully no user will ever need to read this code.
@ -29,13 +29,17 @@ def rust_proto_library(name, deps, visibility = [], **args):
"""
if not name.endswith("_rust_proto"):
fail("Name of each rust_proto_library target should end with `_rust_proto`")
alias_args = {}
if "visibility" in args:
alias_args["visibility"] = args.pop("visibility")
native.alias(
name = name,
actual = select({
"//rust:use_upb_kernel": name + "_upb_kernel",
"//conditions:default": name + "_cpp_kernel",
}),
visibility = visibility,
**alias_args
)
rust_upb_proto_library(

Loading…
Cancel
Save