Skip to content

Convert rust_proto_library to a Starlark symbolic macro.#1424

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_947225402
Open

Convert rust_proto_library to a Starlark symbolic macro.#1424
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_947225402

Conversation

@copybara-service

Copy link
Copy Markdown

Convert rust_proto_library to a Starlark symbolic macro.

Convert rust_proto_library frontend macro to a Starlark symbolic macro (macro(...)). This allows restricting use_upb_kernel visibility to //third_party/protobuf:__subpackages__, avoiding the need to expose it publicly.

Because Starlark symbolic macros strictly require that subtargets generated within macro foo_rust_proto start with foo_rust_proto_, subtarget naming is updated to name + "_upb" (foo_rust_proto_upb) and name + "_cpp" (foo_rust_proto_cpp).

Also update _user_visible_label and rule validation in rules.bzl to handle the updated subtarget naming scheme.

Convert `rust_proto_library` frontend macro to a Starlark symbolic macro (`macro(...)`). This allows restricting `use_upb_kernel` visibility to `//third_party/protobuf:__subpackages__`, avoiding the need to expose it publicly.

Because Starlark symbolic macros strictly require that subtargets generated within macro `foo_rust_proto` start with `foo_rust_proto_`, subtarget naming is updated to `name + "_upb"` (`foo_rust_proto_upb`) and `name + "_cpp"` (`foo_rust_proto_cpp`).

Also update `_user_visible_label` and rule validation in `rules.bzl` to handle the updated subtarget naming scheme.

PiperOrigin-RevId: 947225402
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant