Internal change

PiperOrigin-RevId: 619377672
pull/16327/head
Protobuf Team Bot 2024-03-26 18:50:37 -07:00 committed by Copybara-Service
parent 704d0454dd
commit 83ec410d30
25 changed files with 53 additions and 52 deletions

View File

@ -5,9 +5,9 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
load("@rules_python//python:defs.bzl", "py_binary")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@rules_python//python:defs.bzl", "py_binary")
# begin:google_only
# package(default_applicable_licenses = ["//upb:license"])

View File

@ -15,13 +15,14 @@ But it hasn't been deeply tested or reviewed, and upb should not be in the
business of vending py_proto_library(), so we keep it private to upb.
"""
load("@rules_python//python:py_info.bzl", "PyInfo")
load("@bazel_skylib//lib:paths.bzl", "paths")
# begin:github_only
load("@rules_proto//proto:defs.bzl", "ProtoInfo")
# end:github_only
load("@rules_python//python:py_info.bzl", "PyInfo")
# Generic support code #########################################################
# begin:github_only

View File

@ -1,8 +1,8 @@
"""Implementation of the aspect that powers the upb_*_proto_library() rules."""
load("@rules_proto//proto:defs.bzl", "proto_common")
load("//bazel:upb_proto_library_internal/cc_library_func.bzl", "cc_library_func")
load("//bazel:upb_proto_library_internal/copts.bzl", "UpbProtoLibraryCoptsInfo")
load("@rules_proto//proto:defs.bzl", "proto_common")
# begin:github_only
_is_google3 = False

View File

@ -5,17 +5,16 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
# begin:google_only
# load("@rules_cc//cc:defs.bzl", "cc_proto_library")
# end:google_only
load("@rules_python//python:defs.bzl", "py_binary")
load(
"//bazel:upb_proto_library.bzl",
"upb_c_proto_library",
"upb_proto_reflection_library",
)
# begin:google_only
# load("@rules_cc//cc:defs.bzl", "cc_proto_library")
# end:google_only
load(
":build_defs.bzl",
"cc_optimizefor_proto_library",

View File

@ -2,8 +2,8 @@
load("@rules_java//java:defs.bzl", "java_library")
load("@rules_jvm_external//:defs.bzl", "java_export")
load("//java/osgi:osgi.bzl", "osgi_java_library")
load("//:protobuf_version.bzl", "PROTOBUF_JAVA_VERSION")
load("//java/osgi:osgi.bzl", "osgi_java_library")
JAVA_OPTS = [
"-source 8",

View File

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

View File

@ -3,8 +3,8 @@ load("@rules_java//java:defs.bzl", "java_proto_library")
load("@rules_jvm_external//:kt_defs.bzl", "kt_jvm_export")
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")
load("//:protobuf_version.bzl", "PROTOBUF_JAVA_VERSION")
exports_files([
"src/test/kotlin/com/google/protobuf/Proto3Test.kt",

View File

@ -1,8 +1,8 @@
load("@rules_java//java:defs.bzl", "java_proto_library")
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")
load("//build_defs:java_opts.bzl", "protobuf_java_export", "protobuf_versioned_java_library")
load("//java/internal:testing.bzl", "junit_tests")
java_library(

View File

@ -1,7 +1,7 @@
load("@rules_cc//cc:defs.bzl", "objc_library")
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("//upb/cmake:build_defs.bzl", "staleness_test")
load(":defs.bzl", "objc_proto_camel_case_name")
# The WKTs have to be checked in to support the CocoaPods and Xcode builds. This

View File

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

View File

@ -10,7 +10,6 @@
"""
load("@bazel_skylib//lib:paths.bzl", "paths")
load("//bazel:upb_proto_library.bzl", "GeneratedSrcsInfo", "UpbWrappedCcInfo", "upb_proto_library_aspect")
# begin:google_only
# load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain")
@ -27,6 +26,7 @@ load("//bazel:upb_proto_library.bzl", "GeneratedSrcsInfo", "UpbWrappedCcInfo", "
# begin:github_only
# Compatibility code for Bazel 4.x. Remove this when we drop support for Bazel 4.x.
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
load("//bazel:upb_proto_library.bzl", "GeneratedSrcsInfo", "UpbWrappedCcInfo", "upb_proto_library_aspect")
def upb_use_cpp_toolchain():
return ["@bazel_tools//tools/cpp:toolchain_type"]

View File

@ -5,6 +5,10 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
load(
"@rules_cc//cc:defs.bzl",
"cc_proto_library",
)
load(
"//bazel:build_defs.bzl",
"UPB_DEFAULT_CPPOPTS",
@ -17,10 +21,6 @@ load(
"//protos/bazel:upb_cc_proto_library.bzl",
"upb_cc_proto_library",
)
load(
"@rules_cc//cc:defs.bzl",
"cc_proto_library",
)
# begin:google_only
# package(default_applicable_licenses = ["//upb:license"])

View File

@ -5,14 +5,14 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
load("//python:py_extension.bzl", "py_extension")
load("@bazel_skylib//lib:selects.bzl", "selects")
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//pkg:mappings.bzl", "pkg_files")
load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
load("//python:build_targets.bzl", "build_targets")
load("//python:py_extension.bzl", "py_extension")
build_targets(name = "python")
# end:github_only

View File

@ -5,6 +5,7 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@pip_deps//:requirements.bzl", "requirement")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
@ -12,7 +13,6 @@ load("@rules_python//python:packaging.bzl", "py_wheel")
load("@system_python//:version.bzl", "SYSTEM_PYTHON_VERSION")
load("//:protobuf_version.bzl", "PROTOBUF_PYTHON_VERSION")
load("//bazel:py_proto_library.bzl", "py_proto_library")
load("@bazel_skylib//lib:selects.bzl", "selects")
load(":dist.bzl", "py_dist", "py_dist_module")
licenses(["notice"])

View File

@ -5,12 +5,12 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
load(":pyproto_test_wrapper.bzl", "pyproto_test_wrapper")
# begin:github_only
load("@pip_deps//:requirements.bzl", "requirement")
# end:github_only
load(":pyproto_test_wrapper.bzl", "pyproto_test_wrapper")
# begin:google_only
# package(default_applicable_licenses = ["//upb:license"])
# end:google_only

View File

@ -6,10 +6,10 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
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")
load("//:protobuf_version.bzl", "PROTOBUF_RUBY_VERSION")
load("//conformance:defs.bzl", "conformance_test")
load("//python:internal.bzl", "internal_copy_files")
load("//ruby:defs.bzl", "internal_ruby_proto_library")
################################################################################
# Ruby Runtime

View File

@ -1,8 +1,8 @@
# Protobuf Rust runtime packages.
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain")
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
package(
default_visibility = [

View File

@ -3,13 +3,14 @@
Disclaimer: This project is experimental, under heavy development, and should not
be used yet."""
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
# buildifier: disable=bzl-visibility
load("@rules_rust//rust/private:providers.bzl", "CrateInfo", "DepInfo", "DepVariantInfo")
# buildifier: disable=bzl-visibility
load("@rules_rust//rust/private:rustc.bzl", "rustc_compile_action")
load("//bazel:upb_proto_library.bzl", "UpbWrappedCcInfo", "upb_proto_library_aspect")
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
proto_common = proto_common_do_not_use

View File

@ -1,10 +1,10 @@
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load(
"//rust:defs.bzl",
"rust_cc_proto_library",
"rust_proto_library",
"rust_upb_proto_library",
)
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
UNITTEST_PROTO_TARGET = "//src/google/protobuf:test_protos"

View File

@ -1,9 +1,9 @@
"""This module contains unit tests for rust_proto_library and its aspect."""
load("@bazel_skylib//lib:unittest.bzl", "analysistest", "asserts")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("//rust:aspects.bzl", "RustProtoInfo")
load("//rust:defs.bzl", "rust_cc_proto_library", "rust_upb_proto_library")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load(":defs.bzl", "ActionsInfo", "attach_cc_aspect", "attach_upb_aspect")
def _find_actions_with_mnemonic(actions, mnemonic):

View File

@ -1,9 +1,9 @@
load("@rules_python//python:proto.bzl", "py_proto_library")
load("//bazel:upb_proto_library.bzl", "upb_c_proto_library", "upb_proto_reflection_library")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load(":defaults.bzl", "compile_edition_defaults", "embed_edition_defaults")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_python//python:proto.bzl", "py_proto_library")
load("//:protobuf.bzl", "internal_objc_proto_library")
load("//bazel:upb_proto_library.bzl", "upb_c_proto_library", "upb_proto_reflection_library")
load(":defaults.bzl", "compile_edition_defaults", "embed_edition_defaults")
bzl_library(
name = "defaults",

View File

@ -1,5 +1,5 @@
load(":cc_toolchain_config.bzl", "cc_toolchain_config")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load(":cc_toolchain_config.bzl", "cc_toolchain_config")
package(default_visibility = ["//visibility:public"])

View File

@ -5,8 +5,8 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
load("@rules_python//python:defs.bzl", "py_binary")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@rules_python//python:defs.bzl", "py_binary")
load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
load("//bazel:upb_proto_library_internal/copts.bzl", "upb_proto_library_copts")

View File

@ -5,18 +5,18 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
load(
"//upb/cmake:build_defs.bzl",
"staleness_test",
)
load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
load("//bazel:upb_minitable_proto_library.bzl", "upb_minitable_proto_library")
load("//bazel:upb_proto_library.bzl", "upb_proto_reflection_library")
load(
"//src/google/protobuf/editions:defaults.bzl",
"compile_edition_defaults",
"embed_edition_defaults",
)
load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
load("//bazel:upb_minitable_proto_library.bzl", "upb_minitable_proto_library")
load("//bazel:upb_proto_library.bzl", "upb_proto_reflection_library")
load(
"//upb/cmake:build_defs.bzl",
"staleness_test",
)
load(
"//upb_generator:bootstrap_compiler.bzl",
"bootstrap_cc_library",

View File

@ -1,14 +1,5 @@
"""Macros that implement bootstrapping for the upb code generator."""
load(
"//upb/cmake:build_defs.bzl",
"staleness_test",
)
load(
"//bazel:upb_proto_library.bzl",
"upb_proto_library",
)
# begin:github_only
load(
"//bazel:upb_minitable_proto_library.bzl",
@ -16,6 +7,15 @@ load(
)
# end:github_only
load(
"//bazel:upb_proto_library.bzl",
"upb_proto_library",
)
load(
"//upb/cmake:build_defs.bzl",
"staleness_test",
)
_stages = ["_stage0", "_stage1", ""]
_protoc = "//:protoc"
_upbc_base = "//upb_generator:protoc-gen-"