message: [TF OSS] tf_proto_library also produces a proper proto_library rule of the same name.
diff: @@ -10,6 +10,26 @@ load(
  "if_mkl_ml",
  )
  +def well_known_proto_libs():
  + """Set of standard protobuf protos, like Any and Timestamp.
  +
  + This list should be provided by protobuf.bzl, but it's not.
  + """
  + return [
  + "@com_google_protobuf//:any_proto",
  + "@com_google_protobuf//:api_proto",
  + "@com_google_protobuf//:compiler_plugin_proto",
  + "@com_google_protobuf//:descriptor_proto",
  + "@com_google_protobuf//:duration_proto",
  + "@com_google_protobuf//:empty_proto",
  + "@com_google_protobuf//:field_mask_proto",
  + "@com_google_protobuf//:source_context_proto",
  + "@com_google_protobuf//:struct_proto",
  + "@com_google_protobuf//:timestamp_proto",
  + "@com_google_protobuf//:type_proto",
  + "@com_google_protobuf//:wrappers_proto",
  + ]
  +
  # Appends a suffix to a list of deps.
  def tf_deps(deps, suffix):
  tf_deps = []
  @@ -259,18 +279,6 @@ def cc_proto_library(
  **kargs
  )
  - # Temporarily also add an alias with the 'protolib_name'. So far we relied
  - # on copybara to switch dependencies to the _cc dependencies. Now that these
  - # copybara rules are removed, we need to first change the internal BUILD
  - # files to depend on the correct targets instead, then this can be removed.
  - # TODO(b/143648532): Remove this once all reverse dependencies are migrated.
  - if protolib_name != name:
  - native.alias(
  - name = protolib_name,
  - actual = name,
  - visibility = kargs["visibility"],
  - )
  -
  # Re-defined protocol buffer rule to bring in the change introduced in commit
  # https://github.com/google/protobuf/commit/294b5758c373cbab4b72f35f4cb62dc1d8332b68
  # which was not part of a stable protobuf release in 04/2018.
  @@ -386,19 +394,6 @@ def tf_proto_library_cc(
  deps = [s + "_genproto" for s in protolib_deps],
  )
  - # Temporarily also add an alias with 'name'. So far we relied on
  - # copybara to switch dependencies to the _cc dependencies. Now that these
  - # copybara rules are removed, we need to change the internal BUILD files to
  - # depend on the correct targets instead.
  - # TODO(b/143648532): Remove this once all reverse dependencies are
  - # migrated.
  - native.alias(
  - name = name,
  - actual = cc_name,
  - testonly = testonly,
  - visibility = visibility,
  - )
  -
  native.alias(
  name = cc_name + "_headers_only",
  actual = cc_name,
  @@ -504,8 +499,20 @@ def tf_proto_library(
  make_default_target_header_only = False,
  exports = []):
  """Make a proto library, possibly depending on other proto libraries."""
  +
  + # TODO(b/145545130): Add docstring explaining what rules this creates and how
  + # opensource projects importing TF in bazel can use them safely (i.e. w/o ODR or
  + # ABI violations).
  _ignore = (js_codegen, exports)
  + native.proto_library(
  + name = name,
  + srcs = srcs,
  + deps = protodeps + well_known_proto_libs(),
  + visibility = visibility,
  + testonly = testonly,
  + )
  +
  tf_proto_library_cc(
  name = name,
  testonly = testonly,
  