Add missing alias targets for C++ util libraries

Until recently, these targets were dependencies of `//:protobuf` and could thus
be accessed through that target. But now that we are adhering to the layering
check, we need to provide proper access in a way that respects that check. This
change uses top-level alias targets following the existing pattern.

PiperOrigin-RevId: 605123979
pull/15764/head
Adam Cozzette 12 months ago committed by Copybara-Service
parent 4767a309d3
commit 220548f30c
  1. 36
      BUILD.bazel
  2. 6
      conformance/BUILD.bazel
  3. 2
      pkg/BUILD.bazel
  4. 12
      src/google/protobuf/json/BUILD.bazel
  5. 4
      src/google/protobuf/util/BUILD.bazel

@ -295,6 +295,42 @@ alias(
visibility = ["//visibility:public"],
)
alias(
name = "delimited_message_util",
actual = "//src/google/protobuf/util:delimited_message_util",
visibility = ["//visibility:public"],
)
alias(
name = "differencer",
actual = "//src/google/protobuf/util:differencer",
visibility = ["//visibility:public"],
)
alias(
name = "field_mask_util",
actual = "//src/google/protobuf/util:field_mask_util",
visibility = ["//visibility:public"],
)
alias(
name = "json_util",
actual = "//src/google/protobuf/util:json_util",
visibility = ["//visibility:public"],
)
alias(
name = "time_util",
actual = "//src/google/protobuf/util:time_util",
visibility = ["//visibility:public"],
)
alias(
name = "type_resolver",
actual = "//src/google/protobuf/util:type_resolver",
visibility = ["//visibility:public"],
)
################################################################################
# Java support
################################################################################

@ -149,7 +149,7 @@ cc_library(
"//src/google/protobuf:protobuf_lite",
"//src/google/protobuf/util:differencer",
"//src/google/protobuf/util:json_util",
"//src/google/protobuf/util:type_resolver_util",
"//src/google/protobuf/util:type_resolver",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log:absl_check",
@ -174,7 +174,7 @@ cc_library(
"//src/google/protobuf/editions:test_messages_proto2_editions_cc_proto",
"//src/google/protobuf/editions:test_messages_proto3_editions_cc_proto",
"//src/google/protobuf/json",
"//src/google/protobuf/util:type_resolver_util",
"//src/google/protobuf/util:type_resolver",
"@com_google_absl//absl/log:absl_check",
"@com_google_absl//absl/log:absl_log",
"@com_google_absl//absl/log:die_if_null",
@ -232,7 +232,7 @@ cc_binary(
"//src/google/protobuf/editions:test_messages_proto3_editions_cc_proto",
"//src/google/protobuf/stubs",
"//src/google/protobuf/util:json_util",
"//src/google/protobuf/util:type_resolver_util",
"//src/google/protobuf/util:type_resolver",
"@com_google_absl//absl/log:absl_check",
"@com_google_absl//absl/log:absl_log",
"@com_google_absl//absl/status",

@ -173,7 +173,7 @@ cc_dist_library(
"//src/google/protobuf/util:field_mask_util",
"//src/google/protobuf/util:json_util",
"//src/google/protobuf/util:time_util",
"//src/google/protobuf/util:type_resolver_util",
"//src/google/protobuf/util:type_resolver",
],
)

@ -25,7 +25,7 @@ cc_library(
"//src/google/protobuf/io",
"//src/google/protobuf/io:zero_copy_sink",
"//src/google/protobuf/stubs",
"//src/google/protobuf/util:type_resolver_util",
"//src/google/protobuf/util:type_resolver",
"@com_google_absl//absl/base",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/log:absl_log",
@ -53,7 +53,7 @@ cc_test(
"//src/google/protobuf/stubs",
"//src/google/protobuf/util:json_format_cc_proto",
"//src/google/protobuf/util:json_format_proto3_cc_proto",
"//src/google/protobuf/util:type_resolver_util",
"//src/google/protobuf/util:type_resolver",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
@ -110,7 +110,7 @@ cc_library(
"//src/google/protobuf:type_cc_proto",
"//src/google/protobuf/io",
"//src/google/protobuf/stubs",
"//src/google/protobuf/util:type_resolver_util",
"//src/google/protobuf/util:type_resolver",
"//third_party/utf8_range:utf8_validity",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log:absl_check",
@ -199,7 +199,7 @@ cc_library(
":untyped_message",
"//src/google/protobuf",
"//src/google/protobuf:port",
"//src/google/protobuf/util:type_resolver_util",
"//src/google/protobuf/util:type_resolver",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
@ -230,7 +230,7 @@ cc_library(
"//src/google/protobuf/io",
"//src/google/protobuf/io:zero_copy_sink",
"//src/google/protobuf/stubs",
"//src/google/protobuf/util:type_resolver_util",
"//src/google/protobuf/util:type_resolver",
"@com_google_absl//absl/base",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
@ -266,7 +266,7 @@ cc_library(
"//src/google/protobuf:type_cc_proto",
"//src/google/protobuf/io",
"//src/google/protobuf/stubs",
"//src/google/protobuf/util:type_resolver_util",
"//src/google/protobuf/util:type_resolver",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log:absl_check",
"@com_google_absl//absl/log:absl_log",

@ -195,7 +195,7 @@ cc_test(
)
cc_library(
name = "type_resolver_util",
name = "type_resolver",
srcs = ["type_resolver_util.cc"],
hdrs = [
"type_resolver.h",
@ -228,7 +228,7 @@ cc_test(
":json_format_cc_proto",
":json_format_proto3_cc_proto",
":json_util",
":type_resolver_util",
":type_resolver",
"//src/google/protobuf",
"//src/google/protobuf:any_cc_proto",
"//src/google/protobuf:cc_test_protos",

Loading…
Cancel
Save