diff --git a/CMakeLists.txt b/CMakeLists.txt index eb2eac869177c..2c2bdddc02305 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -346,82 +346,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} ${_gRPC_SYSTEMD_LIBRARIES}) endif() -# Setup external proto library at third_party/envoy-api with 2 download URLs -if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/envoy-api) - # Download the archive via HTTP, validate the checksum, and extract to third_party/envoy-api. - download_archive( - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/envoy-api - https://storage.googleapis.com/grpc-bazel-mirror/github.com/envoyproxy/data-plane-api/archive/9d6ffa70677c4dbf23f6ed569676206c4e2edff4.tar.gz - fff067a5d6d776fc88549b5dd4773a6f8f0187b26a859de8b29bd4226a28ee63 - data-plane-api-9d6ffa70677c4dbf23f6ed569676206c4e2edff4 - ) -endif() -if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/envoy-api) - # Download the archive via HTTP, validate the checksum, and extract to third_party/envoy-api. - download_archive( - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/envoy-api - https://github.com/envoyproxy/data-plane-api/archive/9d6ffa70677c4dbf23f6ed569676206c4e2edff4.tar.gz - fff067a5d6d776fc88549b5dd4773a6f8f0187b26a859de8b29bd4226a28ee63 - data-plane-api-9d6ffa70677c4dbf23f6ed569676206c4e2edff4 - ) -endif() -# Setup external proto library at third_party/googleapis with 2 download URLs -if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googleapis) - # Download the archive via HTTP, validate the checksum, and extract to third_party/googleapis. - download_archive( - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googleapis - https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz - 5bb6b0253ccf64b53d6c7249625a7e3f6c3bc6402abd52d3778bfa48258703a0 - googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92 - ) -endif() -if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googleapis) - # Download the archive via HTTP, validate the checksum, and extract to third_party/googleapis. - download_archive( - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googleapis - https://github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz - 5bb6b0253ccf64b53d6c7249625a7e3f6c3bc6402abd52d3778bfa48258703a0 - googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92 - ) -endif() -# Setup external proto library at third_party/opencensus-proto/src with 2 download URLs -if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opencensus-proto/src) - # Download the archive via HTTP, validate the checksum, and extract to third_party/opencensus-proto/src. - download_archive( - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opencensus-proto/src - https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz - b7e13f0b4259e80c3070b583c2f39e53153085a6918718b1c710caf7037572b0 - opencensus-proto-0.3.0/src - ) -endif() -if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opencensus-proto/src) - # Download the archive via HTTP, validate the checksum, and extract to third_party/opencensus-proto/src. - download_archive( - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opencensus-proto/src - https://github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz - b7e13f0b4259e80c3070b583c2f39e53153085a6918718b1c710caf7037572b0 - opencensus-proto-0.3.0/src - ) -endif() -# Setup external proto library at third_party/xds with 2 download URLs -if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds) - # Download the archive via HTTP, validate the checksum, and extract to third_party/xds. - download_archive( - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds - https://storage.googleapis.com/grpc-bazel-mirror/github.com/cncf/xds/archive/e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz - 0d33b83f8c6368954e72e7785539f0d272a8aba2f6e2e336ed15fd1514bc9899 - xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7 - ) -endif() -if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds) - # Download the archive via HTTP, validate the checksum, and extract to third_party/xds. - download_archive( - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds - https://github.com/cncf/xds/archive/e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz - 0d33b83f8c6368954e72e7785539f0d272a8aba2f6e2e336ed15fd1514bc9899 - xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7 - ) -endif() if(WIN32) set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} ws2_32 crypt32) diff --git a/WORKSPACE b/WORKSPACE index 1217f0c954a04..c6feee13049b8 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -109,6 +109,12 @@ load("@com_github_google_benchmark//:bazel/benchmark_deps.bzl", "benchmark_deps" benchmark_deps() +# This is a transitive dependency from com_github_google_benchmark +bind( + name = "cares", + actual = "@com_github_cares_cares//:ares", +) + load("@io_opentelemetry_cpp//bazel:repository.bzl", "opentelemetry_cpp_deps") opentelemetry_cpp_deps() @@ -117,6 +123,12 @@ load("@io_opentelemetry_cpp//bazel:extra_deps.bzl", "opentelemetry_extra_deps") opentelemetry_extra_deps() +# Transitive dependency of opentelemetry_extra_deps() +bind( + name = "madler_zlib", + actual = "@zlib//:zlib", +) + # TODO: Enable below once https://github.com/bazel-xcode/PodToBUILD/issues/232 is resolved # #http_archive( diff --git a/bazel/generate_cc.bzl b/bazel/generate_cc.bzl index c0eb9401ee4a4..96bccb1426d81 100644 --- a/bazel/generate_cc.bzl +++ b/bazel/generate_cc.bzl @@ -187,7 +187,7 @@ _generate_cc = rule( mandatory = False, ), "_protoc": attr.label( - default = Label("//external:protocol_compiler"), + default = Label("//third_party:protocol_compiler"), executable = True, cfg = "exec", ), diff --git a/bazel/generate_objc.bzl b/bazel/generate_objc.bzl index d9518af7d88c6..20c77573a7ff9 100644 --- a/bazel/generate_objc.bzl +++ b/bazel/generate_objc.bzl @@ -180,7 +180,7 @@ generate_objc = rule( default = "@com_google_protobuf//:well_known_type_protos", ), "_protoc": attr.label( - default = Label("//external:protocol_compiler"), + default = Label("//third_party:protocol_compiler"), executable = True, cfg = "exec", ), diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index f9cee08a1864c..31b74be683c40 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -65,7 +65,7 @@ def _get_external_deps(external_deps): elif dep == "cares": ret += select({ "//:grpc_no_ares": [], - "//conditions:default": ["//external:cares"], + "//conditions:default": ["//third_party:cares"], }) elif dep == "cronet_c_for_grpc": ret.append("//third_party/objective_c/Cronet:cronet_c_for_grpc") @@ -78,7 +78,7 @@ def _get_external_deps(external_deps): elif dep.startswith("google_cloud_cpp"): ret.append(dep.replace("google_cloud_cpp", "@google_cloud_cpp//")) else: - ret.append("//external:" + dep) + ret.append("//third_party:" + dep) return ret def _update_visibility(visibility): diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index dc2500fe63c67..e549ac701b4e0 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -14,222 +14,12 @@ """Load dependencies needed to compile and test the grpc library as a 3rd-party consumer.""" load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("@com_github_grpc_grpc//bazel:grpc_python_deps.bzl", "grpc_python_deps") +load("//bazel:grpc_python_deps.bzl", "grpc_python_deps") # buildifier: disable=unnamed-macro def grpc_deps(): """Loads dependencies need to compile and test the grpc library.""" - native.bind( - name = "upb_lib", - actual = "@com_google_protobuf//upb", - ) - - native.bind( - name = "upb_amalgamation_lib", - actual = "@com_google_protobuf//upb:amalgamation", - ) - - native.bind( - name = "upb_base_lib", - actual = "@com_google_protobuf//upb/base", - ) - - native.bind( - name = "upb_collections_lib", - actual = "@com_google_protobuf//upb/collections", - ) - - native.bind( - name = "upb_mem_lib", - actual = "@com_google_protobuf//upb/mem", - ) - - native.bind( - name = "upb_reflection", - actual = "@com_google_protobuf//upb:reflection", - ) - - native.bind( - name = "upb_lib_descriptor", - actual = "@com_google_protobuf//upb:descriptor_upb_proto", - ) - - native.bind( - name = "upb_lib_descriptor_reflection", - actual = "@com_google_protobuf//upb:descriptor_upb_proto_reflection", - ) - - native.bind( - name = "upb_textformat_lib", - actual = "@com_google_protobuf//upb/text", - ) - - native.bind( - name = "upb_json_lib", - actual = "@com_google_protobuf//upb/json", - ) - - native.bind( - name = "upb_generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", - actual = "@com_google_protobuf//upb:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", - ) - - native.bind( - name = "libssl", - actual = "@boringssl//:ssl", - ) - - native.bind( - name = "libcrypto", - actual = "@boringssl//:crypto", - ) - - native.bind( - name = "madler_zlib", - actual = "@zlib//:zlib", - ) - - native.bind( - name = "protobuf", - actual = "@com_google_protobuf//:protobuf", - ) - - native.bind( - name = "protobuf_clib", - actual = "@com_google_protobuf//:protoc_lib", - ) - - native.bind( - name = "protobuf_headers", - actual = "@com_google_protobuf//:protobuf_headers", - ) - - native.bind( - name = "protocol_compiler", - actual = "@com_google_protobuf//:protoc", - ) - - native.bind( - name = "cares", - actual = "@com_github_cares_cares//:ares", - ) - - native.bind( - name = "gtest", - actual = "@com_google_googletest//:gtest", - ) - - native.bind( - name = "fuzztest", - actual = "@com_google_fuzztest//fuzztest", - ) - - native.bind( - name = "fuzztest_main", - actual = "@com_google_fuzztest//fuzztest:fuzztest_gtest_main", - ) - - native.bind( - name = "benchmark", - actual = "@com_github_google_benchmark//:benchmark", - ) - - native.bind( - name = "re2", - actual = "@com_googlesource_code_re2//:re2", - ) - - native.bind( - name = "grpc_cpp_plugin", - actual = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin", - ) - - native.bind( - name = "grpc++_codegen_proto", - actual = "@com_github_grpc_grpc//:grpc++_codegen_proto", - ) - - native.bind( - name = "opencensus-context", - actual = "@io_opencensus_cpp//opencensus/context:context", - ) - - native.bind( - name = "opencensus-trace", - actual = "@io_opencensus_cpp//opencensus/trace:trace", - ) - - native.bind( - name = "opencensus-trace-context_util", - actual = "@io_opencensus_cpp//opencensus/trace:context_util", - ) - - native.bind( - name = "opencensus-trace-propagation", - actual = "@io_opencensus_cpp//opencensus/trace:grpc_trace_bin", - ) - - native.bind( - name = "opencensus-trace-span_context", - actual = "@io_opencensus_cpp//opencensus/trace:span_context", - ) - - native.bind( - name = "opencensus-stats", - actual = "@io_opencensus_cpp//opencensus/stats:stats", - ) - - native.bind( - name = "opencensus-stats-test", - actual = "@io_opencensus_cpp//opencensus/stats:test_utils", - ) - - native.bind( - name = "opencensus-with-tag-map", - actual = "@io_opencensus_cpp//opencensus/tags:with_tag_map", - ) - - native.bind( - name = "opencensus-tags", - actual = "@io_opencensus_cpp//opencensus/tags:tags", - ) - - native.bind( - name = "opencensus-tags-context_util", - actual = "@io_opencensus_cpp//opencensus/tags:context_util", - ) - - native.bind( - name = "opencensus-trace-stackdriver_exporter", - actual = "@io_opencensus_cpp//opencensus/exporters/trace/stackdriver:stackdriver_exporter", - ) - - native.bind( - name = "opencensus-stats-stackdriver_exporter", - actual = "@io_opencensus_cpp//opencensus/exporters/stats/stackdriver:stackdriver_exporter", - ) - - native.bind( - name = "googleapis_trace_grpc_service", - actual = "@com_google_googleapis//google/devtools/cloudtrace/v2:cloudtrace_cc_grpc", - ) - - native.bind( - name = "googleapis_monitoring_grpc_service", - actual = "@com_google_googleapis//google/monitoring/v3:monitoring_cc_grpc", - ) - - native.bind( - name = "googleapis_logging_grpc_service", - actual = "@com_google_googleapis//google/logging/v2:logging_cc_grpc", - ) - - native.bind( - name = "googleapis_logging_cc_proto", - actual = "@com_google_googleapis//google/logging/v2:logging_cc_proto", - ) - if "platforms" not in native.existing_rules(): http_archive( name = "platforms", @@ -550,15 +340,6 @@ def grpc_test_only_deps(): Loads dependencies that are only needed to run grpc library's tests. """ - native.bind( - name = "twisted", - actual = "@com_github_twisted_twisted//:twisted", - ) - - native.bind( - name = "yaml", - actual = "@com_github_yaml_pyyaml//:yaml", - ) if "com_github_twisted_twisted" not in native.existing_rules(): http_archive( diff --git a/bazel/python_rules.bzl b/bazel/python_rules.bzl index 0bddf921ce9db..702b0f23e6a27 100644 --- a/bazel/python_rules.bzl +++ b/bazel/python_rules.bzl @@ -110,7 +110,7 @@ _gen_py_aspect = aspect( fragments = ["py"], attrs = { "_protoc": attr.label( - default = Label("//external:protocol_compiler"), + default = Label("//third_party:protocol_compiler"), providers = ["files_to_run"], executable = True, cfg = "exec", @@ -166,7 +166,7 @@ py_proto_library = rule( aspects = [_gen_py_aspect], ), "_protoc": attr.label( - default = Label("//external:protocol_compiler"), + default = Label("//third_party:protocol_compiler"), providers = ["files_to_run"], executable = True, cfg = "exec", @@ -259,7 +259,7 @@ _generate_pb2_grpc_src = rule( executable = True, providers = ["files_to_run"], cfg = "exec", - default = Label("//external:protocol_compiler"), + default = Label("//third_party:protocol_compiler"), ), "_grpc_library": attr.label( default = Label("//src/python/grpcio/grpc:grpcio"), diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 3a956abcf0c21..0b02d19541b9e 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -19158,33 +19158,5 @@ targets: - linux - posix - mac -external_proto_libraries: -- destination: third_party/envoy-api - hash: fff067a5d6d776fc88549b5dd4773a6f8f0187b26a859de8b29bd4226a28ee63 - proto_prefix: third_party/envoy-api/ - strip_prefix: data-plane-api-9d6ffa70677c4dbf23f6ed569676206c4e2edff4 - urls: - - https://storage.googleapis.com/grpc-bazel-mirror/github.com/envoyproxy/data-plane-api/archive/9d6ffa70677c4dbf23f6ed569676206c4e2edff4.tar.gz - - https://github.com/envoyproxy/data-plane-api/archive/9d6ffa70677c4dbf23f6ed569676206c4e2edff4.tar.gz -- destination: third_party/googleapis - hash: 5bb6b0253ccf64b53d6c7249625a7e3f6c3bc6402abd52d3778bfa48258703a0 - proto_prefix: third_party/googleapis/ - strip_prefix: googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92 - urls: - - https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz - - https://github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz -- destination: third_party/opencensus-proto/src - hash: b7e13f0b4259e80c3070b583c2f39e53153085a6918718b1c710caf7037572b0 - proto_prefix: third_party/opencensus-proto/src/ - strip_prefix: opencensus-proto-0.3.0/src - urls: - - https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz - - https://github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz -- destination: third_party/xds - hash: 0d33b83f8c6368954e72e7785539f0d272a8aba2f6e2e336ed15fd1514bc9899 - proto_prefix: third_party/xds/ - strip_prefix: xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7 - urls: - - https://storage.googleapis.com/grpc-bazel-mirror/github.com/cncf/xds/archive/e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz - - https://github.com/cncf/xds/archive/e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz +external_proto_libraries: [] tests: [] diff --git a/third_party/BUILD b/third_party/BUILD index b346d6edc0f3b..d74dcc72bb611 100644 --- a/third_party/BUILD +++ b/third_party/BUILD @@ -14,3 +14,221 @@ exports_files([ "rules_python.patch", "protoc-gen-validate.patch", ]) + +package(default_visibility = ["//:__subpackages__"]) + +alias( + name = "upb_lib", + actual = "@com_google_protobuf//upb", +) + +alias( + name = "upb_base_lib", + actual = "@com_google_protobuf//upb/base", +) + +alias( + name = "upb_collections_lib", + actual = "@com_google_protobuf//upb/collections", +) + +alias( + name = "upb_mem_lib", + actual = "@com_google_protobuf//upb/mem", +) + +alias( + name = "upb_reflection", + actual = "@com_google_protobuf//upb:reflection", +) + +alias( + name = "upb_lib_descriptor", + actual = "@com_google_protobuf//upb:descriptor_upb_proto", +) + +alias( + name = "upb_lib_descriptor_reflection", + actual = "@com_google_protobuf//upb:descriptor_upb_proto_reflection", +) + +alias( + name = "upb_textformat_lib", + actual = "@com_google_protobuf//upb/text", +) + +alias( + name = "upb_json_lib", + actual = "@com_google_protobuf//upb/json", +) + +alias( + name = "upb_generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", + actual = "@com_google_protobuf//upb:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", +) + +alias( + name = "libssl", + actual = "@boringssl//:ssl", +) + +alias( + name = "libcrypto", + actual = "@boringssl//:crypto", +) + +alias( + name = "madler_zlib", + actual = "@zlib//:zlib", +) + +alias( + name = "protobuf", + actual = "@com_google_protobuf//:protobuf", +) + +alias( + name = "protobuf_clib", + actual = "@com_google_protobuf//:protoc_lib", +) + +alias( + name = "protobuf_headers", + actual = "@com_google_protobuf//:protobuf_headers", +) + +alias( + name = "protocol_compiler", + actual = "@com_google_protobuf//:protoc", + visibility = ["//visibility:public"], +) + +alias( + name = "cares", + actual = "@com_github_cares_cares//:ares", +) + +alias( + name = "gtest", + actual = "@com_google_googletest//:gtest", +) + +alias( + name = "fuzztest", + actual = "@com_google_fuzztest//fuzztest", +) + +alias( + name = "fuzztest_main", + actual = "@com_google_fuzztest//fuzztest:fuzztest_gtest_main", +) + +alias( + name = "benchmark", + actual = "@com_github_google_benchmark//:benchmark", +) + +alias( + name = "re2", + actual = "@com_googlesource_code_re2//:re2", +) + +alias( + name = "grpc_cpp_plugin", + actual = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin", +) + +alias( + name = "grpc++_codegen_proto", + actual = "@com_github_grpc_grpc//:grpc++_codegen_proto", +) + +alias( + name = "opencensus-context", + actual = "@io_opencensus_cpp//opencensus/context:context", +) + +alias( + name = "opencensus-trace", + actual = "@io_opencensus_cpp//opencensus/trace:trace", +) + +alias( + name = "opencensus-trace-context_util", + actual = "@io_opencensus_cpp//opencensus/trace:context_util", +) + +alias( + name = "opencensus-trace-propagation", + actual = "@io_opencensus_cpp//opencensus/trace:grpc_trace_bin", +) + +alias( + name = "opencensus-trace-span_context", + actual = "@io_opencensus_cpp//opencensus/trace:span_context", +) + +alias( + name = "opencensus-stats", + actual = "@io_opencensus_cpp//opencensus/stats:stats", +) + +alias( + name = "opencensus-stats-test", + actual = "@io_opencensus_cpp//opencensus/stats:test_utils", +) + +alias( + name = "opencensus-with-tag-map", + actual = "@io_opencensus_cpp//opencensus/tags:with_tag_map", +) + +alias( + name = "opencensus-tags", + actual = "@io_opencensus_cpp//opencensus/tags:tags", +) + +alias( + name = "opencensus-tags-context_util", + actual = "@io_opencensus_cpp//opencensus/tags:context_util", +) + +alias( + name = "opencensus-trace-stackdriver_exporter", + actual = "@io_opencensus_cpp//opencensus/exporters/trace/stackdriver:stackdriver_exporter", +) + +alias( + name = "opencensus-stats-stackdriver_exporter", + actual = "@io_opencensus_cpp//opencensus/exporters/stats/stackdriver:stackdriver_exporter", +) + +alias( + name = "googleapis_trace_grpc_service", + actual = "@com_google_googleapis//google/devtools/cloudtrace/v2:cloudtrace_cc_grpc", +) + +alias( + name = "googleapis_monitoring_grpc_service", + actual = "@com_google_googleapis//google/monitoring/v3:monitoring_cc_grpc", +) + +alias( + name = "googleapis_logging_grpc_service", + actual = "@com_google_googleapis//google/logging/v2:logging_cc_grpc", +) + +alias( + name = "googleapis_logging_cc_proto", + actual = "@com_google_googleapis//google/logging/v2:logging_cc_proto", +) + +alias( + name = "twisted", + actual = "@com_github_twisted_twisted//:twisted", +) + +alias( + name = "yaml", + actual = "@com_github_yaml_pyyaml//:yaml", +) diff --git a/third_party/objective_c/google_toolbox_for_mac/BUILD b/third_party/objective_c/google_toolbox_for_mac/BUILD index b801cbc6b85ed..d445bb0971e8e 100644 --- a/third_party/objective_c/google_toolbox_for_mac/BUILD +++ b/third_party/objective_c/google_toolbox_for_mac/BUILD @@ -24,6 +24,6 @@ objc_library( ], visibility = ["//visibility:public"], deps = [ - "//external:gtest", + "//third_party:gtest", ], ) diff --git a/tools/buildgen/extract_metadata_from_bazel_xml.py b/tools/buildgen/extract_metadata_from_bazel_xml.py index 18471eb1d8bfc..85ea17977a427 100755 --- a/tools/buildgen/extract_metadata_from_bazel_xml.py +++ b/tools/buildgen/extract_metadata_from_bazel_xml.py @@ -535,11 +535,11 @@ def update_test_metadata_with_transitive_metadata( bazel_rule = bazel_rules[_get_bazel_label(lib_name)] - if "//external:benchmark" in bazel_rule["_TRANSITIVE_DEPS"]: + if "//third_party:benchmark" in bazel_rule["_TRANSITIVE_DEPS"]: lib_dict["benchmark"] = True lib_dict["defaults"] = "benchmark" - if "//external:gtest" in bazel_rule["_TRANSITIVE_DEPS"]: + if "//third_party:gtest" in bazel_rule["_TRANSITIVE_DEPS"]: # run_tests.py checks the "gtest" property to see if test should be run via gtest. lib_dict["gtest"] = True # TODO: this might be incorrect categorization of the test... @@ -595,9 +595,9 @@ def _expand_upb_proto_library_rules(bazel_rules): # deps is not properly fetched from bazel query for upb_c_proto_library target # so add the upb dependency manually bazel_rule["deps"] = [ - "//external:upb_lib", - "//external:upb_lib_descriptor", - "//external:upb_generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", + "//third_party:upb_lib", + "//third_party:upb_lib_descriptor", + "//third_party:upb_generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", ] # populate the upb_c_proto_library rule with pre-generated upb headers # and sources using proto_rule @@ -664,7 +664,7 @@ def _patch_grpc_proto_library_rules(bazel_rules): and generator_func == "grpc_proto_library" ): # Add explicit protobuf dependency for internal c++ proto targets. - bazel_rule["deps"].append("//external:protobuf") + bazel_rule["deps"].append("//third_party:protobuf") def _patch_descriptor_upb_proto_library(bazel_rules): @@ -1042,7 +1042,7 @@ def _parse_http_archives(xml_tree: ET.Element) -> "List[ExternalProtoLibrary]": def _generate_external_proto_libraries() -> List[Dict[str, Any]]: """Generates the build metadata for external proto libraries""" - xml_tree = _bazel_query_xml_tree("kind(http_archive, //external:*)") + xml_tree = _bazel_query_xml_tree("kind(http_archive, //third_party:*)") libraries = _parse_http_archives(xml_tree) libraries.sort(key=lambda x: x.destination) return list(map(lambda x: x.__dict__, libraries)) @@ -1306,13 +1306,13 @@ def _detect_and_print_issues(build_yaml_like: BuildYaml) -> None: 'deps("//test/...")', 'deps("//:all")', 'deps("//src/compiler/...")', - # allow resolving bind() workspace rules to the actual targets they point to - 'kind(bind, "//external:*")', + # allow resolving alias() targets to the actual targets they point to + 'kind(alias, "//third_party:*")', # The ^ is needed to differentiate proto_library from go_proto_library 'deps(kind("^proto_library", @envoy_api//envoy/...))', # Make sure we have source info for all the targets that _expand_upb_proto_library_rules artificially adds # as upb_c_proto_library dependencies. - 'deps("//external:upb_generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me")', + 'deps("//third_party:upb_generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me")', ] # Step 1: run a bunch of "bazel query --output xml" queries to collect diff --git a/tools/run_tests/sanity/check_bad_dependencies.sh b/tools/run_tests/sanity/check_bad_dependencies.sh index 8883d928c993f..a105ffc056f5b 100755 --- a/tools/run_tests/sanity/check_bad_dependencies.sh +++ b/tools/run_tests/sanity/check_bad_dependencies.sh @@ -18,10 +18,10 @@ set -ex # Make sure that there is no path from known unsecure libraries and targets # to an SSL library. Any failure among these will make the script fail. -test "$(bazel query 'somepath("//:grpc_unsecure", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1 -test "$(bazel query 'somepath("//:grpc++_unsecure", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1 -test "$(bazel query 'somepath("//:grpc++_codegen_proto", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1 -test "$(bazel query 'somepath("//test/cpp/microbenchmarks:helpers", "//external:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1 +test "$(bazel query 'somepath("//:grpc_unsecure", "//third_party:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1 +test "$(bazel query 'somepath("//:grpc++_unsecure", "//third_party:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1 +test "$(bazel query 'somepath("//:grpc++_codegen_proto", "//third_party:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1 +test "$(bazel query 'somepath("//test/cpp/microbenchmarks:helpers", "//third_party:libssl")' 2>/dev/null | wc -l)" -eq 0 || exit 1 # Make sure that core doesn't depend on anything in C++ library