[proto] revert to old-style BUILD rules for channelz and reflection

PiperOrigin-RevId: 693522142
pull/38059/head
Mark D. Roth 3 weeks ago committed by Copybara-Service
parent 2eaaa9cbf7
commit 5011420f16
  1. 6
      BUILD
  2. 8
      bazel/cc_grpc_library.bzl
  3. 25
      src/proto/grpc/channelz/BUILD
  4. 19
      src/proto/grpc/reflection/v1/BUILD
  5. 19
      src/proto/grpc/reflection/v1alpha/BUILD
  6. 2
      src/proto/grpc/testing/BUILD
  7. 4
      src/python/grpcio_channelz/grpc_channelz/v1/BUILD.bazel
  8. 4
      src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel
  9. 2
      test/cpp/end2end/BUILD
  10. 12
      test/cpp/util/BUILD

@ -2526,8 +2526,8 @@ grpc_cc_library(
"config_vars",
"grpc++",
"grpc++_config_proto",
"//src/proto/grpc/reflection/v1:reflection_cc_grpc",
"//src/proto/grpc/reflection/v1alpha:reflection_cc_grpc",
"//src/proto/grpc/reflection/v1:reflection_proto",
"//src/proto/grpc/reflection/v1alpha:reflection_proto",
],
alwayslink = 1,
)
@ -2635,7 +2635,7 @@ grpc_cc_library(
"grpc",
"grpc++",
"grpc++_config_proto",
"//src/proto/grpc/channelz:channelz_cc_grpc",
"//src/proto/grpc/channelz:channelz_proto",
],
alwayslink = 1,
)

@ -70,11 +70,11 @@ def cc_grpc_library(
proto_targets = []
if not grpc_only:
proto_target = "_" + name + "_only"
cc_proto_target = name if proto_only else "_" + name + "_cc_proto"
proto_target = name + "_only"
cc_proto_target = name if proto_only else name + "_cc_proto"
proto_deps = ["_" + dep + "_only" for dep in deps if dep.find(":") == -1]
proto_deps += [dep.split(":")[0] + ":" + "_" + dep.split(":")[1] + "_only" for dep in deps if dep.find(":") != -1 and dep.find("com_google_googleapis") == -1]
proto_deps = [dep + "_only" for dep in deps if dep.find(":") == -1]
proto_deps += [dep.split(":")[0] + ":" + dep.split(":")[1] + "_only" for dep in deps if dep.find(":") != -1 and dep.find("com_google_googleapis") == -1]
proto_deps += [dep for dep in deps if dep.find("com_google_googleapis") != -1]
if well_known_protos:
proto_deps += well_known_proto_libs()

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_grpc_library", "grpc_cc_proto_library", "grpc_internal_proto_library", "grpc_package")
load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
licenses(["notice"])
@ -21,27 +21,14 @@ grpc_package(
visibility = "public",
)
grpc_internal_proto_library(
# TODO(roth): Migrate this to use separate
# grpc_internal_proto_library/grpc_cc_proto_library/grpc_cc_grpc_library
# rules when internal build system limitations are resolved.
grpc_proto_library(
name = "channelz_proto",
srcs = ["channelz.proto"],
has_services = True,
deps = [
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:timestamp_proto",
"@com_google_protobuf//:wrappers_proto",
],
)
grpc_cc_proto_library(
name = "channelz_cc_proto",
deps = ["channelz_proto"],
)
grpc_cc_grpc_library(
name = "channelz_cc_grpc",
srcs = ["channelz_proto"],
deps = ["channelz_cc_proto"],
well_known_protos = True,
)
filegroup(

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_grpc_library", "grpc_cc_proto_library", "grpc_internal_proto_library", "grpc_package")
load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
licenses(["notice"])
@ -21,21 +21,12 @@ grpc_package(
visibility = "public",
)
grpc_internal_proto_library(
# TODO(roth): Migrate this to use separate
# grpc_internal_proto_library/grpc_cc_proto_library/grpc_cc_grpc_library
# rules when internal build system limitations are resolved.
grpc_proto_library(
name = "reflection_proto",
srcs = ["reflection.proto"],
has_services = True,
)
grpc_cc_proto_library(
name = "reflection_cc_proto",
deps = ["reflection_proto"],
)
grpc_cc_grpc_library(
name = "reflection_cc_grpc",
srcs = ["reflection_proto"],
deps = ["reflection_cc_proto"],
)
filegroup(

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_grpc_library", "grpc_cc_proto_library", "grpc_internal_proto_library", "grpc_package")
load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
licenses(["notice"])
@ -21,21 +21,12 @@ grpc_package(
visibility = "public",
)
grpc_internal_proto_library(
# TODO(roth): Migrate this to use separate
# grpc_internal_proto_library/grpc_cc_proto_library/grpc_cc_grpc_library
# rules when internal build system limitations are resolved.
grpc_proto_library(
name = "reflection_proto",
srcs = ["reflection.proto"],
has_services = True,
)
grpc_cc_proto_library(
name = "reflection_cc_proto",
deps = ["reflection_proto"],
)
grpc_cc_grpc_library(
name = "reflection_cc_grpc",
srcs = ["reflection_proto"],
deps = ["reflection_cc_proto"],
)
filegroup(

@ -383,7 +383,7 @@ genrule(
# generated by a separate proto_library rule, so we use an alias to make
# things work.
alias(
name = "_empty_proto_only",
name = "empty_proto_only",
actual = "empty_proto",
)

@ -19,12 +19,12 @@ package(default_visibility = ["//visibility:public"])
py_proto_library(
name = "channelz_py_pb2",
imports = ["../../"],
deps = ["//src/proto/grpc/channelz:channelz_proto"],
deps = ["//src/proto/grpc/channelz:channelz_proto_only"],
)
py_grpc_library(
name = "channelz_py_pb2_grpc",
srcs = ["//src/proto/grpc/channelz:channelz_proto"],
srcs = ["//src/proto/grpc/channelz:channelz_proto_only"],
strip_prefixes = ["src.python.grpcio_channelz."],
deps = [":channelz_py_pb2"],
)

@ -19,12 +19,12 @@ package(default_visibility = ["//visibility:public"])
py_proto_library(
name = "reflection_py_pb2",
imports = ["../../"],
deps = ["//src/proto/grpc/reflection/v1alpha:reflection_proto"],
deps = ["//src/proto/grpc/reflection/v1alpha:reflection_proto_only"],
)
py_grpc_library(
name = "reflection_py_pb2_grpc",
srcs = ["//src/proto/grpc/reflection/v1alpha:reflection_proto"],
srcs = ["//src/proto/grpc/reflection/v1alpha:reflection_proto_only"],
strip_prefixes = ["src.python.grpcio_reflection."],
deps = ["reflection_py_pb2"],
)

@ -342,7 +342,7 @@ grpc_cc_test(
"//:grpc++",
"//:grpcpp_channelz",
"//src/core:slice",
"//src/proto/grpc/channelz:channelz_cc_grpc",
"//src/proto/grpc/channelz:channelz_proto",
"//src/proto/grpc/testing:echo_cc_grpc",
"//src/proto/grpc/testing:echo_messages_cc_proto",
"//test/core/event_engine:event_engine_test_utils",

@ -49,7 +49,7 @@ grpc_cc_library(
deps = [
"//:grpc++",
"//:grpc++_config_proto",
"//src/proto/grpc/reflection/v1alpha:reflection_cc_grpc",
"//src/proto/grpc/reflection/v1alpha:reflection_proto",
],
)
@ -106,7 +106,7 @@ grpc_cc_library(
],
deps = [
"//:grpc++",
"//src/proto/grpc/channelz:channelz_cc_proto",
"//src/proto/grpc/channelz:channelz_proto",
],
)
@ -150,7 +150,7 @@ grpc_cc_library(
deps = [
":grpc++_proto_reflection_desc_db",
"//:grpc++",
"//src/proto/grpc/reflection/v1alpha:reflection_cc_grpc",
"//src/proto/grpc/reflection/v1alpha:reflection_proto",
],
)
@ -332,7 +332,7 @@ grpc_cc_binary(
":grpc_cli_libs",
":test_config",
"//:grpc++",
"//src/proto/grpc/reflection/v1alpha:reflection_cc_grpc",
"//src/proto/grpc/reflection/v1alpha:reflection_proto",
],
)
@ -353,7 +353,7 @@ grpc_cc_binary(
"//:gpr",
"//:grpc++",
"//:grpcpp_channelz",
"//src/proto/grpc/channelz:channelz_cc_grpc",
"//src/proto/grpc/channelz:channelz_proto",
"//test/cpp/util:test_config",
"//test/cpp/util:test_util",
],
@ -384,7 +384,7 @@ grpc_cc_test(
"//:grpc",
"//:grpc++",
"//:grpcpp_channelz",
"//src/proto/grpc/channelz:channelz_cc_grpc",
"//src/proto/grpc/channelz:channelz_proto",
"//src/proto/grpc/testing:test_cc_grpc",
"//test/core/test_util:grpc_test_util",
"//test/cpp/util:test_util",

Loading…
Cancel
Save