Update Bazel references to rules_pkg to the supported file locations. (#15780)

WIP:  I want to see this pass CI first.

Fixes: #15779

3 scripted transforms:
```
  -load("@rules_pkg//:mappings.bzl", ...)
  +load("@rules_pkg//pkg:mappings.bzl", ...)
```
```
  -load("@rules_pkg//:pkg.bzl", "pkg_tar")
  +load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
```
```
  -load("@rules_pkg//:pkg.bzl", "pkg_zip")
  +load("@rules_pkg//pkg:zip.bzl", "pkg_zip")
```

Closes #15780

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15780 from aiuto:rules_pkg a630276341
PiperOrigin-RevId: 606641398
pull/15812/head
aiuto 10 months ago committed by Copybara-Service
parent 3dc3dab85c
commit 3ab1276bbb
  1. 2
      BUILD.bazel
  2. 2
      build_defs/BUILD.bazel
  3. 2
      conformance/BUILD.bazel
  4. 2
      csharp/BUILD.bazel
  5. 2
      csharp/src/Google.Protobuf.Conformance/BUILD.bazel
  6. 2
      examples/BUILD.bazel
  7. 2
      java/BUILD.bazel
  8. 2
      java/core/BUILD.bazel
  9. 2
      java/internal/BUILD.bazel
  10. 2
      java/kotlin-lite/BUILD.bazel
  11. 2
      java/kotlin/BUILD.bazel
  12. 2
      java/lite/BUILD.bazel
  13. 2
      java/util/BUILD.bazel
  14. 2
      objectivec/BUILD.bazel
  15. 4
      php/BUILD.bazel
  16. 4
      pkg/BUILD.bazel
  17. 2
      pkg/build_systems.bzl
  18. 2
      protobuf_release.bzl
  19. 2
      python/BUILD.bazel
  20. 2
      python/build_targets.bzl
  21. 4
      python/dist/BUILD.bazel
  22. 2
      ruby/BUILD.bazel
  23. 2
      ruby/ext/google/protobuf_c/BUILD.bazel
  24. 2
      ruby/lib/google/BUILD.bazel
  25. 2
      ruby/src/main/java/BUILD.bazel
  26. 2
      ruby/tests/BUILD.bazel
  27. 2
      src/BUILD.bazel
  28. 2
      src/google/protobuf/BUILD.bazel
  29. 2
      src/google/protobuf/compiler/BUILD.bazel
  30. 2
      src/google/protobuf/compiler/cpp/BUILD.bazel
  31. 2
      src/google/protobuf/compiler/csharp/BUILD.bazel
  32. 2
      src/google/protobuf/compiler/java/BUILD.bazel
  33. 2
      src/google/protobuf/compiler/objectivec/BUILD.bazel
  34. 2
      src/google/protobuf/compiler/php/BUILD.bazel
  35. 2
      src/google/protobuf/compiler/python/BUILD.bazel
  36. 2
      src/google/protobuf/compiler/ruby/BUILD.bazel
  37. 2
      src/google/protobuf/io/BUILD.bazel
  38. 2
      src/google/protobuf/stubs/BUILD.bazel
  39. 2
      src/google/protobuf/testing/BUILD.bazel
  40. 2
      src/google/protobuf/util/BUILD.bazel

@ -2,7 +2,7 @@
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_proto_library")
load("@rules_java//java:defs.bzl", "java_lite_proto_library", "java_proto_library")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain", "proto_library")
load("//build_defs:cpp_opts.bzl", "COPTS", "LINK_OPTS")
load(":protobuf.bzl", "internal_objc_proto_library", "internal_php_proto_library", "internal_py_proto_library")

@ -2,7 +2,7 @@
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@rules_cc//cc:defs.bzl", starlark_cc_proto_library = "cc_proto_library")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load(":cc_proto_blacklist_test.bzl", "cc_proto_blacklist_test")
load(":compiler_config_setting.bzl", "create_compiler_config_setting")

@ -2,7 +2,7 @@
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_proto_library", "objc_library")
load(
"@rules_pkg//:mappings.bzl",
"@rules_pkg//pkg:mappings.bzl",
"pkg_filegroup",
"pkg_files",
"strip_prefix",

@ -2,7 +2,7 @@
#
# See also code generation logic under /src/google/protobuf/compiler/csharp.
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//build_defs:internal_shell.bzl", "inline_sh_test")
load("//conformance:defs.bzl", "conformance_test")

@ -1,5 +1,5 @@
load("//build_defs:internal_shell.bzl", "inline_sh_binary")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
inline_sh_binary(
name = "build_conformance_test",

@ -6,7 +6,7 @@
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_proto_library")
load("@rules_java//java:defs.bzl", "java_binary", "java_lite_proto_library", "java_proto_library")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_proto//proto:defs.bzl", "proto_library")
# For each .proto file, a proto_library target should be defined. This target

@ -1,4 +1,4 @@
load("@rules_pkg//:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
# Run Linkage Monitor
sh_test(

@ -1,6 +1,6 @@
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@rules_java//java:defs.bzl", "java_lite_proto_library", "java_proto_library")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain", "proto_library")
load("//:protobuf.bzl", "internal_gen_well_known_protos_java")
load("//:protobuf_version.bzl", "PROTOBUF_JAVA_VERSION")

@ -1,4 +1,4 @@
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
package(default_visibility = ["//java:__subpackages__"])

@ -1,7 +1,7 @@
load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")
load("@rules_java//java:defs.bzl", "java_lite_proto_library")
load("@rules_jvm_external//:kt_defs.bzl", "kt_jvm_export")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//:protobuf.bzl", "internal_gen_kt_protos")
load("//:protobuf_version.bzl", "PROTOBUF_JAVA_VERSION")

@ -1,7 +1,7 @@
load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")
load("@rules_java//java:defs.bzl", "java_proto_library")
load("@rules_jvm_external//:kt_defs.bzl", "kt_jvm_export")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//:protobuf_version.bzl", "PROTOBUF_JAVA_VERSION")
load("//:protobuf.bzl", "internal_gen_kt_protos")

@ -1,5 +1,5 @@
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@rules_pkg//:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain")
load("//conformance:defs.bzl", "conformance_test")
load("//java/internal:testing.bzl", "junit_tests")

@ -1,5 +1,5 @@
load("@rules_java//java:defs.bzl", "java_proto_library")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//build_defs:java_opts.bzl", "protobuf_java_export", "protobuf_versioned_java_library")
load("//:protobuf_version.bzl", "PROTOBUF_JAVA_VERSION")

@ -1,5 +1,5 @@
load("@rules_cc//cc:defs.bzl", "objc_library")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//upb/cmake:build_defs.bzl", "staleness_test")
load("//conformance:defs.bzl", "conformance_test")
load(":defs.bzl", "objc_proto_camel_case_name")

@ -2,8 +2,8 @@
#
# See also code generation logic under /src/google/protobuf/compiler/php.
load("@rules_pkg//:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
load("//:protobuf_version.bzl", "PROTOBUF_PHP_VERSION", "PROTOC_VERSION")
load("//build_defs:internal_shell.bzl", "inline_sh_binary")
load("//conformance:defs.bzl", "conformance_test")

@ -1,9 +1,9 @@
load(
"@rules_pkg//:mappings.bzl",
"@rules_pkg//pkg:mappings.bzl",
"pkg_attributes",
"pkg_files",
)
load("@rules_pkg//:pkg.bzl", "pkg_zip")
load("@rules_pkg//pkg:zip.bzl", "pkg_zip")
load("//:protobuf_release.bzl", "package_naming")
load(":build_systems.bzl", "gen_file_lists")
load(":cc_dist_library.bzl", "cc_dist_library")

@ -1,7 +1,7 @@
"""Starlark utilities for working with other build systems."""
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@rules_pkg//:providers.bzl", "PackageFilegroupInfo", "PackageFilesInfo")
load("@rules_pkg//pkg:providers.bzl", "PackageFilegroupInfo", "PackageFilesInfo")
load(":cc_dist_library.bzl", "CcFileList")
################################################################################

@ -2,7 +2,7 @@
Generates package naming variables for use with rules_pkg.
"""
load("@rules_pkg//:providers.bzl", "PackageVariablesInfo")
load("@rules_pkg//pkg:providers.bzl", "PackageVariablesInfo")
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
load(":protobuf_version.bzl", "PROTOC_VERSION")

@ -11,7 +11,7 @@ load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag")
load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
# begin:github_only
load("@rules_pkg//:mappings.bzl", "pkg_files")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files")
load("//python:build_targets.bzl", "build_targets")
build_targets(name = "python")

@ -6,7 +6,7 @@
# //:protobuf_python
# //:well_known_types_py_pb2
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_python//python:defs.bzl", "py_library")
load("//:protobuf.bzl", "internal_py_proto_library")
load("//build_defs:arch_tests.bzl", "aarch64_test", "x86_64_test")

@ -6,8 +6,8 @@
# https://developers.google.com/open-source/licenses/bsd
load("@pip_deps//:requirements.bzl", "requirement")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
load("@rules_python//python:packaging.bzl", "py_wheel")
load("@system_python//:version.bzl", "SYSTEM_PYTHON_VERSION")
load("//:protobuf_version.bzl", "PROTOBUF_PYTHON_VERSION")

@ -4,7 +4,7 @@
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_ruby//ruby:defs.bzl", "ruby_library")
load("//python:internal.bzl", "internal_copy_files")
load("//ruby:defs.bzl", "internal_ruby_proto_library")

@ -1,5 +1,5 @@
load("@build_bazel_rules_apple//apple:apple_binary.bzl", "apple_binary")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//upb/cmake:build_defs.bzl", "staleness_test")
package(default_visibility = ["//ruby:__subpackages__"])

@ -1,4 +1,4 @@
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_ruby//ruby:defs.bzl", "ruby_library")
config_setting(

@ -1,5 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
java_library(
name = "protobuf_java",

@ -1,4 +1,4 @@
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_ruby//ruby:defs.bzl", "ruby_library", "ruby_test")
load("//ruby:defs.bzl", "internal_ruby_proto_library")

@ -3,7 +3,7 @@
################################################################################
# Most rules are under google/protobuf. This package exists for convenience.
load("@rules_pkg//:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
load("//conformance:defs.bzl", "conformance_test")
load("//upb/cmake:build_defs.bzl", "staleness_test")

@ -3,7 +3,7 @@
################################################################################
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library", "cc_test")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//build_defs:cpp_opts.bzl", "COPTS", "LINK_OPTS")
load("//upb/cmake:build_defs.bzl", "staleness_test")

@ -4,7 +4,7 @@
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_proto_library", "cc_test")
load(
"@rules_pkg//:mappings.bzl",
"@rules_pkg//pkg:mappings.bzl",
"pkg_attributes",
"pkg_files",
"strip_prefix",

@ -3,7 +3,7 @@
################################################################################
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library", "cc_test")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//build_defs:cpp_opts.bzl", "COPTS")

@ -3,7 +3,7 @@
################################################################################
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//build_defs:cpp_opts.bzl", "COPTS")
cc_library(

@ -3,7 +3,7 @@
################################################################################
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//build_defs:cpp_opts.bzl", "COPTS")
cc_library(

@ -3,7 +3,7 @@
################################################################################
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//build_defs:cpp_opts.bzl", "COPTS")
cc_library(

@ -3,7 +3,7 @@
################################################################################
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//build_defs:cpp_opts.bzl", "COPTS")
cc_library(

@ -3,7 +3,7 @@
################################################################################
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//build_defs:cpp_opts.bzl", "COPTS")
cc_library(

@ -3,7 +3,7 @@
################################################################################
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//build_defs:cpp_opts.bzl", "COPTS")
cc_library(

@ -1,7 +1,7 @@
# Protobuf IO library.
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//build_defs:cpp_opts.bzl", "COPTS")
package(

@ -2,7 +2,7 @@
# These are utilities that mirror the behavior of internal Google code.
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//build_defs:cpp_opts.bzl", "COPTS", "LINK_OPTS")
package(

@ -2,7 +2,7 @@
# This package contains testonly utilities used in C++ unit tests.
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//build_defs:cpp_opts.bzl", "COPTS", "LINK_OPTS")
package(

@ -3,7 +3,7 @@
################################################################################
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library", "cc_test")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//build_defs:cpp_opts.bzl", "COPTS")

Loading…
Cancel
Save