examples: Update proto library macros Don't use deprecated pw_proto_library anymore Change-Id: I8e40c17584b04040f4da5d7f84a88a85207f9b6a Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/examples/+/314112 Reviewed-by: Armando Montanez <amontanez@google.com> Pigweed-Auto-Submit: Austin Foxley <afoxley@google.com> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Austin Foxley <afoxley@google.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
diff --git a/examples/03_rpc/BUILD.bazel b/examples/03_rpc/BUILD.bazel index 4f997a5..9f8b0cd 100644 --- a/examples/03_rpc/BUILD.bazel +++ b/examples/03_rpc/BUILD.bazel
@@ -13,11 +13,9 @@ # the License. load("@bazel_skylib//rules:native_binary.bzl", "native_binary") -load( - "@pigweed//pw_protobuf_compiler:pw_proto_library.bzl", - "pw_proto_filegroup", - "pw_proto_library", -) +load("@pigweed//pw_protobuf_compiler:nanopb_proto_library.bzl", "nanopb_proto_library") +load("@pigweed//pw_protobuf_compiler:nanopb_rpc_proto_library.bzl", "nanopb_rpc_proto_library") +load("@pigweed//pw_protobuf_compiler:pw_proto_filegroup.bzl", "pw_proto_filegroup") load("@pigweed//pw_system/py:console.bzl", "device_console", "device_simulator_console") load("@pigweed//targets/host_device_simulator:transition.bzl", "host_device_simulator_binary") load("@rules_cc//cc:cc_binary.bzl", "cc_binary") @@ -40,8 +38,14 @@ deps = ["@pigweed//pw_protobuf:common_proto"], ) -pw_proto_library( - name = "rpc_example_protos_cc", +nanopb_proto_library( + name = "rpc_example_protos_nanopb", + deps = [":rpc_example_protos"], +) + +nanopb_rpc_proto_library( + name = "rpc_example_protos_nanopb_rpc", + nanopb_proto_library_deps = [":rpc_example_protos_nanopb"], deps = [":rpc_example_protos"], ) @@ -57,7 +61,7 @@ hdrs = ["public/rpc_example/rpc_example_service_nanopb.h"], includes = ["public"], deps = [ - ":rpc_example_protos_cc.nanopb_rpc", + ":rpc_example_protos_nanopb_rpc", "@pigweed//pw_log", "@pigweed//pw_sync:mutex", ],