Skip to content

Commit

Permalink
pw_protobuf_compiler: Wrap nanopb refs in Label
Browse files Browse the repository at this point in the history
The reference to nanopb should be evaluated within the context of the
Pigweed repository, not the repository that uses nanopb_proto_library in
its BUILD.bazel file. Otherwise, users will be required to list nanopb
as a direct dependency in their MODULE.bazel (instead of using the
transitive dependency they get anyway through Pigweed).

Bug: 325533050
Change-Id: Ie10bcb4849c44a7537e7fed89fe020ed3dc86740
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/256660
Pigweed-Auto-Submit: Ted Pudlik <[email protected]>
Docs-Not-Needed: Ted Pudlik <[email protected]>
Lint: Lint 🤖 <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
Reviewed-by: Dave Roth <[email protected]>
  • Loading branch information
tpudlik authored and CQ Bot Account committed Dec 27, 2024
1 parent 97587cb commit 54608c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pw_protobuf_compiler/nanopb_proto_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def nanopb_proto_library(*, name, deps, tags = [], options = None, **kwargs):
name = name,
protos = deps,
deps = [
"@com_github_nanopb_nanopb//:nanopb",
Label("@com_github_nanopb_nanopb//:nanopb"),
Label("//pw_assert"),
Label("//pw_containers:vector"),
Label("//pw_preprocessor"),
Expand All @@ -59,7 +59,7 @@ def nanopb_proto_library(*, name, deps, tags = [], options = None, **kwargs):

_nanopb_proto_compiler_aspect = proto_compiler_aspect(
["pb.h", "pb.c"],
"@com_github_nanopb_nanopb//:protoc-gen-nanopb",
Label("@com_github_nanopb_nanopb//:protoc-gen-nanopb"),
[],
{
"_pb_h": attr.label(
Expand Down

0 comments on commit 54608c1

Please sign in to comment.