Skip to content

Commit

Permalink
Resolve comments, add back some transitive dependencies to fix exampl…
Browse files Browse the repository at this point in the history
…e code
  • Loading branch information
mkruskal-google committed Apr 5, 2023
1 parent 7aa96e7 commit fd16d6e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
10 changes: 8 additions & 2 deletions examples/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,19 @@ cc_proto_library(
cc_binary(
name = "add_person_cpp",
srcs = ["add_person.cc"],
deps = [":addressbook_cc_proto"],
deps = [
":addressbook_cc_proto",
"@com_google_protobuf//:protobuf",
],
)

cc_binary(
name = "list_people_cpp",
srcs = ["list_people.cc"],
deps = [":addressbook_cc_proto"],
deps = [
":addressbook_cc_proto",
"@com_google_protobuf//:protobuf",
],
)

# Similar to cc_proto_library but for Java.
Expand Down
23 changes: 13 additions & 10 deletions src/google/protobuf/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,18 @@ genrule(
visibility = ["//visibility:private"],
)

staleness_test(
name = "well_known_types_staleness_test",
outs =
[wkt + ".pb.h" for wkt in WELL_KNOWN_TYPES] +
[wkt + ".pb.cc" for wkt in WELL_KNOWN_TYPES],
generated_pattern = "wkt/google/protobuf/%s",
tags = ["manual"],
)

# This is necessary for our generated cmake configs to pick up the checked in
# WKT files.
# TODO(b/246826624) Remove this once we generate WKT code from cmake.
cc_library(
name = "cmake_wkt_cc_proto",
srcs = ["wkt/google/protobuf/" + wkt + ".pb.cc" for wkt in WELL_KNOWN_TYPES],
Expand All @@ -153,16 +165,6 @@ cc_library(
deps = [":protobuf_nowkt"],
)


staleness_test(
name = "well_known_types_staleness_test",
outs =
[wkt + ".pb.h" for wkt in WELL_KNOWN_TYPES] +
[wkt + ".pb.cc" for wkt in WELL_KNOWN_TYPES],
generated_pattern = "wkt/google/protobuf/%s",
tags = ["manual"],
)

# Built-in runtime types

proto_library(
Expand Down Expand Up @@ -855,6 +857,7 @@ cc_library(
visibility = ["//:__subpackages__"],
deps = [
"//src/google/protobuf/io",
"//src/google/protobuf/util:differencer",
"@com_google_googletest//:gtest",
],
)
Expand Down

0 comments on commit fd16d6e

Please sign in to comment.