diff --git a/bazel/EXTERNAL_DEPS.md b/bazel/EXTERNAL_DEPS.md index b7919b5b06c8..2694e7cc05da 100644 --- a/bazel/EXTERNAL_DEPS.md +++ b/bazel/EXTERNAL_DEPS.md @@ -16,7 +16,7 @@ build process. 1. Define a new Bazel repository in [`bazel/repositories.bzl`](repositories.bzl), in the `envoy_dependencies()` function. 2. Reference your new external dependency in some `envoy_cc_library` via the - `external_deps` attribute. + `deps` attribute. 3. `bazel test //test/...` ## External CMake (preferred) @@ -28,7 +28,7 @@ This is the preferred style of adding dependencies that use CMake for their buil 2. Add an `envoy_cmake` rule to [`bazel/foreign_cc/BUILD`](foreign_cc/BUILD). This will reference the source repository in step 1. 3. Reference your new external dependency in some `envoy_cc_library` via the name bound in step 1 - `external_deps` attribute. + `deps` attribute. 4. `bazel test //test/...` # Adding external dependencies to Envoy (Python) diff --git a/bazel/envoy_build_system.bzl b/bazel/envoy_build_system.bzl index f6492e18d2e1..5d7f8654fa2b 100644 --- a/bazel/envoy_build_system.bzl +++ b/bazel/envoy_build_system.bzl @@ -211,13 +211,13 @@ def envoy_proto_descriptor(name, out, srcs = [], external_deps = []): options.extend(["-I" + include_path for include_path in include_paths]) options.append("--descriptor_set_out=$@") - cmd = "$(location //external:protoc) " + " ".join(options + input_files) + cmd = "$(location @com_google_protobuf//:protoc) " + " ".join(options + input_files) native.genrule( name = name, srcs = srcs, outs = [out], cmd = cmd, - tools = ["//external:protoc"], + tools = ["@com_google_protobuf//:protoc"], ) # Dependencies on Google grpc should be wrapped with this function. diff --git a/bazel/envoy_internal.bzl b/bazel/envoy_internal.bzl index 45c6acb8ecbb..b84d93ef7a5b 100644 --- a/bazel/envoy_internal.bzl +++ b/bazel/envoy_internal.bzl @@ -166,15 +166,15 @@ def tcmalloc_external_dep(repository): repository + "//bazel:disable_tcmalloc": None, repository + "//bazel:disable_tcmalloc_on_linux_x86_64": None, repository + "//bazel:disable_tcmalloc_on_linux_aarch64": None, - repository + "//bazel:debug_tcmalloc": envoy_external_dep_path("gperftools"), - repository + "//bazel:debug_tcmalloc_on_linux_x86_64": envoy_external_dep_path("gperftools"), - repository + "//bazel:debug_tcmalloc_on_linux_aarch64": envoy_external_dep_path("gperftools"), - repository + "//bazel:gperftools_tcmalloc": envoy_external_dep_path("gperftools"), - repository + "//bazel:gperftools_tcmalloc_on_linux_x86_64": envoy_external_dep_path("gperftools"), - repository + "//bazel:gperftools_tcmalloc_on_linux_aarch64": envoy_external_dep_path("gperftools"), - repository + "//bazel:linux_x86_64": envoy_external_dep_path("tcmalloc"), - repository + "//bazel:linux_aarch64": envoy_external_dep_path("tcmalloc"), - "//conditions:default": envoy_external_dep_path("gperftools"), + repository + "//bazel:debug_tcmalloc": repository + "//bazel/foreign_cc:gperftools", + repository + "//bazel:debug_tcmalloc_on_linux_x86_64": repository + "//bazel/foreign_cc:gperftools", + repository + "//bazel:debug_tcmalloc_on_linux_aarch64": repository + "//bazel/foreign_cc:gperftools", + repository + "//bazel:gperftools_tcmalloc": repository + "//bazel/foreign_cc:gperftools", + repository + "//bazel:gperftools_tcmalloc_on_linux_x86_64": repository + "//bazel/foreign_cc:gperftools", + repository + "//bazel:gperftools_tcmalloc_on_linux_aarch64": repository + "//bazel/foreign_cc:gperftools", + repository + "//bazel:linux_x86_64": "@com_github_google_tcmalloc//tcmalloc", + repository + "//bazel:linux_aarch64": "@com_github_google_tcmalloc//tcmalloc", + "//conditions:default": repository + "//bazel/foreign_cc:gperftools", }) # Select the given values if default path normalization is on in the current build. diff --git a/bazel/envoy_library.bzl b/bazel/envoy_library.bzl index c1266770d7d9..d5ed602b2f3d 100644 --- a/bazel/envoy_library.bzl +++ b/bazel/envoy_library.bzl @@ -24,23 +24,23 @@ def tcmalloc_external_deps(repository): repository + "//bazel:disable_tcmalloc": [], repository + "//bazel:disable_tcmalloc_on_linux_x86_64": [], repository + "//bazel:disable_tcmalloc_on_linux_aarch64": [], - repository + "//bazel:debug_tcmalloc": [envoy_external_dep_path("gperftools")], - repository + "//bazel:debug_tcmalloc_on_linux_x86_64": [envoy_external_dep_path("gperftools")], - repository + "//bazel:debug_tcmalloc_on_linux_aarch64": [envoy_external_dep_path("gperftools")], - repository + "//bazel:gperftools_tcmalloc": [envoy_external_dep_path("gperftools")], - repository + "//bazel:gperftools_tcmalloc_on_linux_x86_64": [envoy_external_dep_path("gperftools")], - repository + "//bazel:gperftools_tcmalloc_on_linux_aarch64": [envoy_external_dep_path("gperftools")], + repository + "//bazel:debug_tcmalloc": [repository + "//bazel/foreign_cc:gperftools"], + repository + "//bazel:debug_tcmalloc_on_linux_x86_64": [repository + "//bazel/foreign_cc:gperftools"], + repository + "//bazel:debug_tcmalloc_on_linux_aarch64": [repository + "//bazel/foreign_cc:gperftools"], + repository + "//bazel:gperftools_tcmalloc": [repository + "//bazel/foreign_cc:gperftools"], + repository + "//bazel:gperftools_tcmalloc_on_linux_x86_64": [repository + "//bazel/foreign_cc:gperftools"], + repository + "//bazel:gperftools_tcmalloc_on_linux_aarch64": [repository + "//bazel/foreign_cc:gperftools"], repository + "//bazel:linux_x86_64": [ - envoy_external_dep_path("tcmalloc"), - envoy_external_dep_path("tcmalloc_profile_marshaler"), - envoy_external_dep_path("tcmalloc_malloc_extension"), + "@com_github_google_tcmalloc//tcmalloc", + "@com_github_google_tcmalloc//tcmalloc:profile_marshaler", + "@com_github_google_tcmalloc//tcmalloc:malloc_extension", ], repository + "//bazel:linux_aarch64": [ - envoy_external_dep_path("tcmalloc"), - envoy_external_dep_path("tcmalloc_profile_marshaler"), - envoy_external_dep_path("tcmalloc_malloc_extension"), + "@com_github_google_tcmalloc//tcmalloc", + "@com_github_google_tcmalloc//tcmalloc:profile_marshaler", + "@com_github_google_tcmalloc//tcmalloc:malloc_extension", ], - "//conditions:default": [envoy_external_dep_path("gperftools")], + "//conditions:default": [repository + "//bazel/foreign_cc:gperftools"], }) # Envoy C++ library targets that need no transformations or additional dependencies before being diff --git a/bazel/envoy_pch.bzl b/bazel/envoy_pch.bzl index 843937d8dcac..1e9766b68016 100644 --- a/bazel/envoy_pch.bzl +++ b/bazel/envoy_pch.bzl @@ -27,8 +27,8 @@ def envoy_pch_library( name, includes, deps, - external_deps, visibility, + external_deps = [], testonly = False, repository = ""): native.cc_library( diff --git a/bazel/envoy_test.bzl b/bazel/envoy_test.bzl index 0bdfc36c513f..c9a4266603e1 100644 --- a/bazel/envoy_test.bzl +++ b/bazel/envoy_test.bzl @@ -40,7 +40,7 @@ def _envoy_cc_test_infrastructure_library( extra_deps = [] pch_copts = [] if disable_pch: - extra_deps = [envoy_external_dep_path("googletest")] + extra_deps = ["@com_google_googletest//:gtest"] else: extra_deps = envoy_pch_deps(repository, "//test:test_pch") pch_copts = envoy_pch_copts(repository, "//test:test_pch") @@ -175,9 +175,10 @@ def envoy_cc_test( linkopts = _envoy_test_linkopts() + linkopts, linkstatic = envoy_linkstatic(), malloc = tcmalloc_external_dep(repository), - deps = envoy_stdlib_deps() + deps + [envoy_external_dep_path(dep) for dep in external_deps + ["googletest"]] + [ + deps = envoy_stdlib_deps() + deps + [envoy_external_dep_path(dep) for dep in external_deps] + [ repository + "//test:main", repository + "//test/test_common:test_version_linkstamp", + "@com_google_googletest//:gtest", ] + envoy_pch_deps(repository, "//test:test_pch"), # from https://github.com/google/googletest/blob/6e1970e2376c14bf658eb88f655a054030353f9f/googlemock/src/gmock.cc#L51 # 2 - by default, mocks act as StrictMocks. diff --git a/bazel/external/json.BUILD b/bazel/external/json.BUILD deleted file mode 100644 index cc19af32bf49..000000000000 --- a/bazel/external/json.BUILD +++ /dev/null @@ -1,19 +0,0 @@ -licenses(["notice"]) # Apache 2 - -cc_library( - name = "nlohmann_json_lib", - hdrs = glob([ - "include/nlohmann/*.hpp", - "include/nlohmann/**/*.hpp", - "include/nlohmann/*/*/*.hpp", - ]), - includes = ["external/nlohmann_json_lib"], - visibility = ["//visibility:public"], -) - -cc_library( - name = "json", - includes = ["include"], - visibility = ["//visibility:public"], - deps = [":nlohmann_json_lib"], -) diff --git a/bazel/external/quiche.BUILD b/bazel/external/quiche.BUILD index 950f9426a6a3..3923966229ce 100644 --- a/bazel/external/quiche.BUILD +++ b/bazel/external/quiche.BUILD @@ -2460,10 +2460,7 @@ envoy_quic_cc_library( "quiche/quic/core/crypto/quic_compressed_certs_cache.h", "quiche/quic/core/crypto/transport_parameters.h", ], - external_deps = [ - "ssl", - "zlib", - ], + external_deps = ["ssl"], tags = [ "pg3", ], @@ -2489,6 +2486,7 @@ envoy_quic_cc_library( ":quic_core_utils_lib", ":quic_core_versions_lib", ":quic_platform", + "@envoy//bazel/foreign_cc:zlib", ], ) @@ -2502,9 +2500,6 @@ envoy_quic_cc_library( "quiche/quic/core/crypto/quic_client_session_cache.h", "quiche/quic/core/crypto/quic_crypto_client_config.h", ], - external_deps = [ - "zlib", - ], tags = [ "pg3", ], @@ -2513,6 +2508,7 @@ envoy_quic_cc_library( ":quic_core_crypto_client_proof_source_lib", ":quic_core_crypto_crypto_handshake_lib", ":quiche_common_platform_client_stats", + "@envoy//bazel/foreign_cc:zlib", ], ) @@ -2524,10 +2520,7 @@ envoy_quic_cc_library( hdrs = [ "quiche/quic/core/crypto/quic_crypto_server_config.h", ], - external_deps = [ - "ssl", - "zlib", - ], + external_deps = ["ssl"], tags = [ "pg3", ], @@ -2536,6 +2529,7 @@ envoy_quic_cc_library( ":quic_core_proto_crypto_server_config_proto_header", ":quic_core_server_id_lib", ":quic_server_crypto_tls_handshake_lib", + "@envoy//bazel/foreign_cc:zlib", ], ) @@ -2658,9 +2652,7 @@ envoy_quic_cc_library( name = "quic_core_crypto_proof_source_x509_lib", srcs = ["quiche/quic/core/crypto/proof_source_x509.cc"], hdrs = ["quiche/quic/core/crypto/proof_source_x509.h"], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], deps = [ ":quic_core_crypto_certificate_view_lib", ":quic_core_crypto_crypto_handshake_lib", diff --git a/bazel/foreign_cc/BUILD b/bazel/foreign_cc/BUILD index 81f04ab3d5e7..60271a492559 100644 --- a/bazel/foreign_cc/BUILD +++ b/bazel/foreign_cc/BUILD @@ -310,8 +310,8 @@ envoy_cmake( deps = [ ":ares", ":nghttp2", + ":zlib", "//external:ssl", - "//external:zlib", ], ) diff --git a/bazel/protobuf.patch b/bazel/protobuf.patch index 833b4aa9b7b5..c07b5ce9d83f 100644 --- a/bazel/protobuf.patch +++ b/bazel/protobuf.patch @@ -101,12 +101,12 @@ index e7555ee10..a93beb1c5 100644 diff --git a/src/google/protobuf/io/BUILD.bazel b/src/google/protobuf/io/BUILD.bazel --- a/src/google/protobuf/io/BUILD.bazel +++ b/src/google/protobuf/io/BUILD.bazel -@@ -138,7 +138,7 @@ cc_library( +@@ -138,6 +138,6 @@ cc_library( "@com_google_absl//absl/log:absl_log", ] + select({ "//build_defs:config_msvc": [], - "//conditions:default": ["@zlib"], -+ "//conditions:default": ["//external:zlib"], ++ "//conditions:default": ["@envoy//bazel/foreign_cc:zlib"], }), ) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index f0fed861eeab..99f1d57d6c4d 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -165,7 +165,6 @@ def envoy_dependencies(skip_targets = []): _com_github_nghttp2_nghttp2() _com_github_msgpack_cpp() _com_github_skyapm_cpp2sky() - _com_github_nodejs_http_parser() _com_github_alibaba_hessian2_codec() _com_github_tencent_rapidjson() _com_github_nlohmann_json() @@ -267,20 +266,12 @@ def _com_github_openhistogram_libcircllhist(): name = "com_github_openhistogram_libcircllhist", build_file = "@envoy//bazel/external:libcircllhist.BUILD", ) - native.bind( - name = "libcircllhist", - actual = "@com_github_openhistogram_libcircllhist//:libcircllhist", - ) def _com_github_axboe_liburing(): external_http_archive( name = "com_github_axboe_liburing", build_file_content = BUILD_ALL_CONTENT, ) - native.bind( - name = "uring", - actual = "@envoy//bazel/foreign_cc:liburing_linux", - ) def _com_github_bazel_buildtools(): # TODO(phlax): Add binary download @@ -294,30 +285,18 @@ def _com_github_c_ares_c_ares(): name = "com_github_c_ares_c_ares", build_file_content = BUILD_ALL_CONTENT, ) - native.bind( - name = "ares", - actual = "@envoy//bazel/foreign_cc:ares", - ) def _com_github_cyan4973_xxhash(): external_http_archive( name = "com_github_cyan4973_xxhash", build_file = "@envoy//bazel/external:xxhash.BUILD", ) - native.bind( - name = "xxhash", - actual = "@com_github_cyan4973_xxhash//:xxhash", - ) def _com_github_envoyproxy_sqlparser(): external_http_archive( name = "com_github_envoyproxy_sqlparser", build_file = "@envoy//bazel/external:sqlparser.BUILD", ) - native.bind( - name = "sqlparser", - actual = "@com_github_envoyproxy_sqlparser//:sqlparser", - ) def _com_github_mirror_tclap(): external_http_archive( @@ -325,30 +304,18 @@ def _com_github_mirror_tclap(): build_file = "@envoy//bazel/external:tclap.BUILD", patch_args = ["-p1"], ) - native.bind( - name = "tclap", - actual = "@com_github_mirror_tclap//:tclap", - ) def _com_github_fmtlib_fmt(): external_http_archive( name = "com_github_fmtlib_fmt", build_file = "@envoy//bazel/external:fmtlib.BUILD", ) - native.bind( - name = "fmtlib", - actual = "@com_github_fmtlib_fmt//:fmtlib", - ) def _com_github_gabime_spdlog(): external_http_archive( name = "com_github_gabime_spdlog", build_file = "@envoy//bazel/external:spdlog.BUILD", ) - native.bind( - name = "spdlog", - actual = "@com_github_gabime_spdlog//:spdlog", - ) def _com_github_google_benchmark(): external_http_archive( @@ -358,10 +325,6 @@ def _com_github_google_benchmark(): name = "libpfm", build_file = "@com_github_google_benchmark//tools:libpfm.BUILD.bazel", ) - native.bind( - name = "benchmark", - actual = "@com_github_google_benchmark//:benchmark", - ) def _com_github_google_libprotobuf_mutator(): external_http_archive( @@ -375,11 +338,6 @@ def _com_github_google_libsxg(): build_file_content = BUILD_ALL_CONTENT, ) - native.bind( - name = "libsxg", - actual = "@envoy//bazel/foreign_cc:libsxg", - ) - def _com_github_unicode_org_icu(): external_http_archive( name = "com_github_unicode_org_icu", @@ -437,40 +395,24 @@ def _com_github_jbeder_yaml_cpp(): external_http_archive( name = "com_github_jbeder_yaml_cpp", ) - native.bind( - name = "yaml_cpp", - actual = "@com_github_jbeder_yaml_cpp//:yaml-cpp", - ) def _com_github_libevent_libevent(): external_http_archive( name = "com_github_libevent_libevent", build_file_content = BUILD_ALL_CONTENT, ) - native.bind( - name = "event", - actual = "@envoy//bazel/foreign_cc:event", - ) def _net_colm_open_source_colm(): external_http_archive( name = "net_colm_open_source_colm", build_file_content = BUILD_ALL_CONTENT, ) - native.bind( - name = "colm", - actual = "@envoy//bazel/foreign_cc:colm", - ) def _net_colm_open_source_ragel(): external_http_archive( name = "net_colm_open_source_ragel", build_file_content = BUILD_ALL_CONTENT, ) - native.bind( - name = "ragel", - actual = "@envoy//bazel/foreign_cc:ragel", - ) def _net_zlib(): external_http_archive( @@ -480,11 +422,6 @@ def _net_zlib(): patches = ["@envoy//bazel/foreign_cc:zlib.patch"], ) - native.bind( - name = "zlib", - actual = "@envoy//bazel/foreign_cc:zlib", - ) - # Bind for grpc. native.bind( name = "madler_zlib", @@ -524,14 +461,6 @@ def _org_brotli(): external_http_archive( name = "org_brotli", ) - native.bind( - name = "brotlienc", - actual = "@org_brotli//:brotlienc", - ) - native.bind( - name = "brotlidec", - actual = "@org_brotli//:brotlidec", - ) def _com_github_facebook_zstd(): external_http_archive( @@ -539,11 +468,6 @@ def _com_github_facebook_zstd(): build_file_content = BUILD_ALL_CONTENT, ) - native.bind( - name = "zstd", - actual = "@envoy//bazel/foreign_cc:zstd", - ) - def _com_google_cel_cpp(): external_http_archive( "com_google_cel_cpp", @@ -584,10 +508,6 @@ def _com_github_msgpack_cpp(): name = "com_github_msgpack_cpp", build_file = "@envoy//bazel/external:msgpack.BUILD", ) - native.bind( - name = "msgpack", - actual = "@com_github_msgpack_cpp//:msgpack", - ) def _io_hyperscan(): external_http_archive( @@ -608,17 +528,9 @@ def _io_vectorscan(): def _io_opentelemetry_api_cpp(): external_http_archive(name = "io_opentelemetry_cpp") - native.bind( - name = "opentelemetry_api", - actual = "@io_opentelemetry_cpp//api:api", - ) def _com_github_datadog_dd_trace_cpp(): external_http_archive("com_github_datadog_dd_trace_cpp") - native.bind( - name = "dd_trace_cpp", - actual = "@com_github_datadog_dd_trace_cpp//:dd_trace_cpp", - ) def _com_github_skyapm_cpp2sky(): external_http_archive( @@ -627,10 +539,6 @@ def _com_github_skyapm_cpp2sky(): external_http_archive( name = "skywalking_data_collect_protocol", ) - native.bind( - name = "cpp2sky", - actual = "@com_github_skyapm_cpp2sky//source:cpp2sky_data_lib", - ) def _com_github_tencent_rapidjson(): external_http_archive( @@ -641,39 +549,16 @@ def _com_github_tencent_rapidjson(): def _com_github_nlohmann_json(): external_http_archive( name = "com_github_nlohmann_json", - build_file = "@envoy//bazel/external:json.BUILD", - ) - native.bind( - name = "json", - actual = "@com_github_nlohmann_json//:json", - ) - -def _com_github_nodejs_http_parser(): - native.bind( - name = "http_parser", - actual = "@envoy//bazel/external/http_parser", ) def _com_github_alibaba_hessian2_codec(): external_http_archive("com_github_alibaba_hessian2_codec") - native.bind( - name = "hessian2_codec_object_codec_lib", - actual = "@com_github_alibaba_hessian2_codec//hessian2/basic_codec:object_codec_lib", - ) - native.bind( - name = "hessian2_codec_codec_impl", - actual = "@com_github_alibaba_hessian2_codec//hessian2:codec_impl_lib", - ) def _com_github_ncopa_suexec(): external_http_archive( name = "com_github_ncopa_suexec", build_file = "@envoy//bazel/external:su-exec.BUILD", ) - native.bind( - name = "su-exec", - actual = "@com_github_ncopa_suexec//:su-exec", - ) def _com_google_googletest(): external_http_archive( @@ -681,10 +566,6 @@ def _com_google_googletest(): patches = ["@envoy//bazel:googletest.patch"], patch_args = ["-p1"], ) - native.bind( - name = "googletest", - actual = "@com_google_googletest//:gtest", - ) # TODO(jmarantz): replace the use of bind and external_deps with just # the direct Bazel path at all sites. This will make it easier to @@ -736,6 +617,7 @@ def _com_google_protobuf(): patch_args = ["-p1"], ) + # Needed by grpc, jwt_verify_lib, maybe others. native.bind( name = "protobuf", actual = "@com_google_protobuf//:protobuf", @@ -748,10 +630,6 @@ def _com_google_protobuf(): name = "protocol_compiler", actual = "@com_google_protobuf//:protoc", ) - native.bind( - name = "protoc", - actual = "@com_google_protobuf//:protoc", - ) # Needed for `bazel fetch` to work with @com_google_protobuf # https://github.com/google/protobuf/blob/v3.6.1/util/python/BUILD#L6-L9 @@ -759,6 +637,8 @@ def _com_google_protobuf(): name = "python_headers", actual = "//bazel:python_headers", ) + + # Needed by grpc until we update again. native.bind( name = "upb_base_lib", actual = "@com_google_protobuf//upb:base", @@ -788,42 +668,6 @@ def _io_opencensus_cpp(): external_http_archive( name = "io_opencensus_cpp", ) - native.bind( - name = "opencensus_trace", - actual = "@io_opencensus_cpp//opencensus/trace", - ) - native.bind( - name = "opencensus_trace_b3", - actual = "@io_opencensus_cpp//opencensus/trace:b3", - ) - native.bind( - name = "opencensus_trace_cloud_trace_context", - actual = "@io_opencensus_cpp//opencensus/trace:cloud_trace_context", - ) - native.bind( - name = "opencensus_trace_grpc_trace_bin", - actual = "@io_opencensus_cpp//opencensus/trace:grpc_trace_bin", - ) - native.bind( - name = "opencensus_trace_trace_context", - actual = "@io_opencensus_cpp//opencensus/trace:trace_context", - ) - native.bind( - name = "opencensus_exporter_ocagent", - actual = "@io_opencensus_cpp//opencensus/exporters/trace/ocagent:ocagent_exporter", - ) - native.bind( - name = "opencensus_exporter_stdout", - actual = "@io_opencensus_cpp//opencensus/exporters/trace/stdout:stdout_exporter", - ) - native.bind( - name = "opencensus_exporter_stackdriver", - actual = "@io_opencensus_cpp//opencensus/exporters/trace/stackdriver:stackdriver_exporter", - ) - native.bind( - name = "opencensus_exporter_zipkin", - actual = "@io_opencensus_cpp//opencensus/exporters/trace/zipkin:zipkin_exporter", - ) def _com_github_curl(): # The usage by AWS extensions common utilities is deprecated and will be removed by Q3 2024 after @@ -857,6 +701,8 @@ def _v8(): ], patch_args = ["-p1"], ) + + # Needed by proxy_wasm_cpp_host. native.bind( name = "wee8", actual = "@v8//:wee8", @@ -867,6 +713,8 @@ def _com_googlesource_chromium_base_trace_event_common(): name = "com_googlesource_chromium_base_trace_event_common", build_file = "@v8//:bazel/BUILD.trace_event_common", ) + + # Needed by v8. native.bind( name = "base_trace_event_common", actual = "@com_googlesource_chromium_base_trace_event_common//:trace_event_common", @@ -878,38 +726,6 @@ def _com_github_google_quiche(): patch_cmds = ["find quiche/ -type f -name \"*.bazel\" -delete"], build_file = "@envoy//bazel/external:quiche.BUILD", ) - native.bind( - name = "quiche_common_platform", - actual = "@com_github_google_quiche//:quiche_common_platform", - ) - native.bind( - name = "quiche_http2_adapter", - actual = "@com_github_google_quiche//:http2_adapter", - ) - native.bind( - name = "quiche_http2_protocol", - actual = "@com_github_google_quiche//:http2_adapter_http2_protocol", - ) - native.bind( - name = "quiche_http2_test_tools", - actual = "@com_github_google_quiche//:http2_adapter_mock_http2_visitor", - ) - native.bind( - name = "quiche_quic_platform", - actual = "@com_github_google_quiche//:quic_platform", - ) - native.bind( - name = "quiche_quic_platform_base", - actual = "@com_github_google_quiche//:quic_platform_base", - ) - native.bind( - name = "quiche_http2_hpack", - actual = "@com_github_google_quiche//:http2_hpack_hpack_lib", - ) - native.bind( - name = "quiche_http2_hpack_decoder", - actual = "@com_github_google_quiche//:http2_hpack_decoder_hpack_decoder_lib", - ) def _com_googlesource_googleurl(): external_http_archive( @@ -949,7 +765,7 @@ def _com_github_grpc_grpc(): ) native.bind( name = "cares", - actual = "//external:ares", + actual = "@envoy//bazel/foreign_cc:ares", ) native.bind( @@ -983,6 +799,7 @@ def _rules_proto_grpc(): def _re2(): external_http_archive("com_googlesource_code_re2") + # Needed by grpc. native.bind( name = "re2", actual = "@com_googlesource_code_re2//:re2", @@ -1016,16 +833,6 @@ def _emsdk(): def _com_github_google_jwt_verify(): external_http_archive("com_github_google_jwt_verify") - native.bind( - name = "jwt_verify_lib", - actual = "@com_github_google_jwt_verify//:jwt_verify_lib", - ) - - native.bind( - name = "simple_lru_cache_lib", - actual = "@com_github_google_jwt_verify//:simple_lru_cache_lib", - ) - def _com_github_luajit_luajit(): external_http_archive( name = "com_github_luajit_luajit", @@ -1035,38 +842,16 @@ def _com_github_luajit_luajit(): patch_cmds = ["chmod u+x build.py"], ) - native.bind( - name = "luajit", - actual = "@envoy//bazel/foreign_cc:luajit", - ) - def _com_github_google_tcmalloc(): external_http_archive( name = "com_github_google_tcmalloc", ) - native.bind( - name = "tcmalloc", - actual = "@com_github_google_tcmalloc//tcmalloc", - ) - native.bind( - name = "tcmalloc_profile_marshaler", - actual = "@com_github_google_tcmalloc//tcmalloc:profile_marshaler", - ) - native.bind( - name = "tcmalloc_malloc_extension", - actual = "@com_github_google_tcmalloc//tcmalloc:malloc_extension", - ) - def _com_github_gperftools_gperftools(): external_http_archive( name = "com_github_gperftools_gperftools", build_file_content = BUILD_ALL_CONTENT, ) - native.bind( - name = "gperftools", - actual = "@envoy//bazel/foreign_cc:gperftools", - ) def _com_github_wamr(): external_http_archive( @@ -1157,10 +942,6 @@ filegroup( patches = ["@envoy//bazel/foreign_cc:librdkafka.patch"], patch_args = ["-p1"], ) - native.bind( - name = "librdkafka", - actual = "@envoy//bazel/foreign_cc:librdkafka", - ) # This archive provides Kafka (and Zookeeper) binaries, that are used during Kafka integration # tests. diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 3258e8aad1d5..6d4295b53b15 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -225,7 +225,7 @@ function bazel_binary_build() { //test/tools/router_check:router_check_tool "${CONFIG_ARGS[@]}" # Build su-exec utility - bazel build "${BAZEL_BUILD_OPTIONS[@]}" --remote_download_toplevel -c "${COMPILE_TYPE}" external:su-exec + bazel build "${BAZEL_BUILD_OPTIONS[@]}" --remote_download_toplevel -c "${COMPILE_TYPE}" @com_github_ncopa_suexec//:su-exec cp_binary_for_image_build "${BINARY_TYPE}" "${COMPILE_TYPE}" "${EXE_NAME}" } diff --git a/contrib/common/sqlutils/source/BUILD b/contrib/common/sqlutils/source/BUILD index c100c39ae95c..fb660bbee58e 100644 --- a/contrib/common/sqlutils/source/BUILD +++ b/contrib/common/sqlutils/source/BUILD @@ -12,8 +12,8 @@ envoy_cc_library( name = "sqlutils_lib", srcs = ["sqlutils.cc"], hdrs = ["sqlutils.h"], - external_deps = ["sqlparser"], deps = [ "//source/common/protobuf:utility_lib", + "@com_github_envoyproxy_sqlparser//:sqlparser", ], ) diff --git a/contrib/common/sqlutils/test/BUILD b/contrib/common/sqlutils/test/BUILD index e89cb0138b71..087e44dcdb90 100644 --- a/contrib/common/sqlutils/test/BUILD +++ b/contrib/common/sqlutils/test/BUILD @@ -13,8 +13,8 @@ envoy_cc_test( srcs = [ "sqlutils_test.cc", ], - external_deps = ["sqlparser"], deps = [ "//contrib/common/sqlutils/source:sqlutils_lib", + "@com_github_envoyproxy_sqlparser//:sqlparser", ], ) diff --git a/contrib/cryptomb/private_key_providers/test/BUILD b/contrib/cryptomb/private_key_providers/test/BUILD index 2940695756b1..777cc49f89c8 100644 --- a/contrib/cryptomb/private_key_providers/test/BUILD +++ b/contrib/cryptomb/private_key_providers/test/BUILD @@ -87,13 +87,11 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "speed_test", srcs = ["speed_test.cc"], - external_deps = [ - "benchmark", - "ssl", - ], + external_deps = ["ssl"], deps = [ "//contrib/cryptomb/private_key_providers/source:ipp_crypto_wrapper_lib", "//source/common/common:assert_lib", "//source/common/common:utility_lib", + "@com_github_google_benchmark//:benchmark", ], ) diff --git a/contrib/hyperscan/matching/input_matchers/source/BUILD b/contrib/hyperscan/matching/input_matchers/source/BUILD index ee3ce33489d8..8f00c2bdfa37 100644 --- a/contrib/hyperscan/matching/input_matchers/source/BUILD +++ b/contrib/hyperscan/matching/input_matchers/source/BUILD @@ -5,10 +5,6 @@ load( "envoy_cmake", "envoy_contrib_package", ) -load( - "//bazel:envoy_internal.bzl", - "envoy_external_dep_path", -) load( "//contrib:all_contrib_extensions.bzl", "envoy_contrib_linux_aarch64_constraints", @@ -38,7 +34,7 @@ envoy_cmake( tags = ["skip_on_windows"], target_compatible_with = envoy_contrib_linux_x86_64_constraints(), deps = [ - envoy_external_dep_path("ragel"), + "//bazel/foreign_cc:ragel", ], ) @@ -64,7 +60,7 @@ envoy_cmake( tags = ["skip_on_windows"], target_compatible_with = envoy_contrib_linux_aarch64_constraints(), deps = [ - envoy_external_dep_path("ragel"), + "//bazel/foreign_cc:ragel", ], ) diff --git a/contrib/hyperscan/matching/input_matchers/test/BUILD b/contrib/hyperscan/matching/input_matchers/test/BUILD index aa1ebb140fbe..3be84e8b8c9c 100644 --- a/contrib/hyperscan/matching/input_matchers/test/BUILD +++ b/contrib/hyperscan/matching/input_matchers/test/BUILD @@ -39,10 +39,10 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "hyperscan_speed_test", srcs = ["hyperscan_speed_test.cc"], - external_deps = ["benchmark"], deps = [ "//source/common/common:assert_lib", "//source/common/common:utility_lib", + "@com_github_google_benchmark//:benchmark", "@com_googlesource_code_re2//:re2", ] + select({ "//bazel:linux_x86_64": [ @@ -57,13 +57,13 @@ envoy_cc_benchmark_binary( envoy_cc_benchmark_binary( name = "matcher_speed_test", srcs = ["matcher_speed_test.cc"], - external_deps = ["benchmark"], deps = [ "//source/common/common:assert_lib", "//source/common/common:regex_lib", "//source/common/common:utility_lib", "//source/common/thread_local:thread_local_lib", "//test/mocks/event:event_mocks", + "@com_github_google_benchmark//:benchmark", ] + select({ "//bazel:linux_x86_64": [ "//contrib/hyperscan/matching/input_matchers/source:hyperscan_matcher_lib", diff --git a/contrib/kafka/filters/network/source/mesh/BUILD b/contrib/kafka/filters/network/source/mesh/BUILD index b52c41fa5f3a..69f6e35ff242 100644 --- a/contrib/kafka/filters/network/source/mesh/BUILD +++ b/contrib/kafka/filters/network/source/mesh/BUILD @@ -4,7 +4,6 @@ load( "envoy_cc_library", "envoy_contrib_package", ) -load("//bazel:envoy_internal.bzl", "envoy_external_dep_path") licenses(["notice"]) # Apache 2 @@ -253,9 +252,9 @@ envoy_cc_library( ], tags = ["skip_on_windows"], deps = [ + "//bazel/foreign_cc:librdkafka", "//envoy/common:pure_lib", "@com_google_absl//absl/strings", - envoy_external_dep_path("librdkafka"), ], ) @@ -270,7 +269,7 @@ envoy_cc_library( tags = ["skip_on_windows"], deps = [ ":librdkafka_utils_lib", - envoy_external_dep_path("librdkafka"), + "//bazel/foreign_cc:librdkafka", "//source/common/common:macros", ], ) diff --git a/contrib/kafka/filters/network/test/mesh/BUILD b/contrib/kafka/filters/network/test/mesh/BUILD index 06a76c4afe00..184e5623c6ae 100644 --- a/contrib/kafka/filters/network/test/mesh/BUILD +++ b/contrib/kafka/filters/network/test/mesh/BUILD @@ -4,10 +4,6 @@ load( "envoy_cc_test_library", "envoy_contrib_package", ) -load( - "//bazel:envoy_internal.bzl", - "envoy_external_dep_path", -) licenses(["notice"]) # Apache 2 @@ -104,7 +100,7 @@ envoy_cc_test_library( hdrs = ["kafka_mocks.h"], tags = ["skip_on_windows"], deps = [ - envoy_external_dep_path("librdkafka"), + "//bazel/foreign_cc:librdkafka", "//contrib/kafka/filters/network/source/mesh:librdkafka_utils_lib", ], ) diff --git a/contrib/mysql_proxy/filters/network/test/BUILD b/contrib/mysql_proxy/filters/network/test/BUILD index 1a7e65a43469..bb6bfecf238e 100644 --- a/contrib/mysql_proxy/filters/network/test/BUILD +++ b/contrib/mysql_proxy/filters/network/test/BUILD @@ -109,7 +109,6 @@ envoy_cc_test( "mysql_command_test.cc", ], data = ["mysql_test_config.yaml"], - external_deps = ["sqlparser"], deps = [ ":mysql_test_utils_lib", "//contrib/mysql_proxy/filters/network/source:codec_lib", @@ -117,5 +116,6 @@ envoy_cc_test( "//source/common/tcp_proxy", "//source/extensions/filters/network/tcp_proxy:config", "//test/integration:integration_lib", + "@com_github_envoyproxy_sqlparser//:sqlparser", ], ) diff --git a/contrib/qat/compression/qatzstd/compressor/source/BUILD b/contrib/qat/compression/qatzstd/compressor/source/BUILD index 960fa2b9b55e..f1d7caa3a385 100644 --- a/contrib/qat/compression/qatzstd/compressor/source/BUILD +++ b/contrib/qat/compression/qatzstd/compressor/source/BUILD @@ -34,8 +34,8 @@ make( "install", ], deps = [ + "//bazel/foreign_cc:zstd", "//contrib/qat:qatlib", - "//external:zstd", ], ) diff --git a/contrib/qat/private_key_providers/source/BUILD b/contrib/qat/private_key_providers/source/BUILD index e6dfb8ac264b..76757e972fe4 100644 --- a/contrib/qat/private_key_providers/source/BUILD +++ b/contrib/qat/private_key_providers/source/BUILD @@ -32,9 +32,7 @@ envoy_cc_library( "qat.h", "qat_private_key_provider.h", ], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], deps = [ ":libqat_wrapper_lib", "//envoy/api:api_interface", diff --git a/contrib/sxg/filters/http/source/BUILD b/contrib/sxg/filters/http/source/BUILD index 1d3b5b9231a6..83a1f04817cf 100644 --- a/contrib/sxg/filters/http/source/BUILD +++ b/contrib/sxg/filters/http/source/BUILD @@ -21,7 +21,6 @@ envoy_cc_library( "filter.h", "filter_config.h", ], - external_deps = ["libsxg"], deps = [ "//envoy/server:filter_config_interface", "//source/common/config:datasource_lib", @@ -31,6 +30,7 @@ envoy_cc_library( "//source/common/secret:secret_provider_impl_lib", "//source/extensions/filters/http/common:pass_through_filter_lib", "@envoy_api//contrib/envoy/extensions/filters/http/sxg/v3alpha:pkg_cc_proto", + "//bazel/foreign_cc:libsxg", # use boringssl alias to select fips vs non-fips version. "//bazel:boringssl", ], diff --git a/distribution/binary/BUILD b/distribution/binary/BUILD index 5d610f0d075d..4f7288753076 100644 --- a/distribution/binary/BUILD +++ b/distribution/binary/BUILD @@ -18,7 +18,7 @@ bundled( "//distribution:envoy-dwarf": "dbg/envoy.dwp", "//distribution:envoy-contrib-binary": "dbg/envoy-contrib", "//distribution:envoy-contrib-dwarf": "dbg/envoy-contrib.dwp", - "//external:su-exec": "utils/su-exec", + "@com_github_ncopa_suexec//:su-exec": "utils/su-exec", }, ) diff --git a/distribution/binary/compiler.bzl b/distribution/binary/compiler.bzl index 1506be1260de..aa4a28737151 100644 --- a/distribution/binary/compiler.bzl +++ b/distribution/binary/compiler.bzl @@ -32,7 +32,7 @@ # targets = { # "//distribution:envoy-binary": "envoy", # "//distribution:envoy-contrib-binary": "envoy-contrib", -# "//external:su-exec": "utils/su-exec", +# "@com_github_ncopa_suexec//:su-exec": "utils/su-exec", # }, # ) # diff --git a/envoy/grpc/BUILD b/envoy/grpc/BUILD index 47b963119499..50ae15b20519 100644 --- a/envoy/grpc/BUILD +++ b/envoy/grpc/BUILD @@ -46,9 +46,7 @@ envoy_cc_library( envoy_cc_library( name = "google_grpc_creds_interface", hdrs = ["google_grpc_creds.h"], - external_deps = [ - "grpc", - ], + external_deps = ["grpc"], deps = [ "//envoy/api:api_interface", "//envoy/config:typed_config_interface", diff --git a/mobile/bazel/protobuf.patch b/mobile/bazel/protobuf.patch index e786c7ebe146..d3bb99748364 100644 --- a/mobile/bazel/protobuf.patch +++ b/mobile/bazel/protobuf.patch @@ -12,12 +12,12 @@ diff --git a/BUILD b/BUILD index efc3d8e7f..746ad4851 100644 --- a/BUILD +++ b/BUILD -@@ -24,7 +24,7 @@ config_setting( +@@ -24,4 +24,4 @@ config_setting( # ZLIB configuration ################################################################################ -ZLIB_DEPS = ["@zlib//:zlib"] -+ZLIB_DEPS = ["//external:zlib"] ++ZLIB_DEPS = ["@envoy//bazel/foreign_cc:zlib"] ################################################################################ # Protobuf Runtime Library diff --git a/source/common/common/BUILD b/source/common/common/BUILD index 415b71d4c284..e2f26a09a229 100644 --- a/source/common/common/BUILD +++ b/source/common/common/BUILD @@ -127,11 +127,9 @@ envoy_cc_library( envoy_basic_cc_library( name = "fmt_lib", hdrs = ["fmt.h"], - external_deps = [ - "fmtlib", - ], deps = [ "//envoy/common:base_includes", + "@com_github_fmtlib_fmt//:fmtlib", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", ], @@ -141,11 +139,11 @@ envoy_cc_library( name = "hash_lib", srcs = ["hash.cc"], hdrs = ["hash.h"], - external_deps = ["xxhash"], deps = [ ":macros", ":safe_memcpy_lib", "//envoy/common:base_includes", + "@com_github_cyan4973_xxhash//:xxhash", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", ], @@ -167,14 +165,12 @@ envoy_cc_library( name = "key_value_store_lib", srcs = ["key_value_store_base.cc"], hdrs = ["key_value_store_base.h"], - external_deps = [ - "quiche_quic_platform", - ], deps = [ "//envoy/common:key_value_store_interface", "//envoy/event:dispatcher_interface", "//envoy/filesystem:filesystem_interface", "//source/common/config:ttl_lib", + "@com_github_google_quiche//:quic_platform", "@com_github_google_quiche//:quiche_common_lib", "@com_google_absl//absl/cleanup", ], @@ -229,10 +225,8 @@ envoy_cc_library( name = "base_logger_lib", srcs = ["base_logger.cc"], hdrs = ["base_logger.h"], - external_deps = [ - "spdlog", - ], deps = [ + "@com_github_gabime_spdlog//:spdlog", "@com_google_absl//absl/strings", ], ) @@ -585,9 +579,6 @@ envoy_cc_library( envoy_pch_library( name = "common_pch", - external_deps = [ - "spdlog", - ], includes = [ "envoy/config/bootstrap/v3/bootstrap.pb.h", "envoy/config/cluster/v3/cluster.pb.h", @@ -598,6 +589,7 @@ envoy_pch_library( "envoy/service/discovery/v3/discovery.pb.h", "spdlog/sinks/android_sink.h", "spdlog/spdlog.h", + "@com_github_gabime_spdlog//:spdlog", ], visibility = ["//visibility:public"], deps = [ diff --git a/source/common/compression/zstd/common/BUILD b/source/common/compression/zstd/common/BUILD index e9ecaa5338b2..523ef652efb6 100644 --- a/source/common/compression/zstd/common/BUILD +++ b/source/common/compression/zstd/common/BUILD @@ -12,8 +12,8 @@ envoy_cc_library( name = "zstd_base_lib", srcs = ["base.cc"], hdrs = ["base.h"], - external_deps = ["zstd"], deps = [ + "//bazel/foreign_cc:zstd", "//source/common/buffer:buffer_lib", ], ) diff --git a/source/common/crypto/BUILD b/source/common/crypto/BUILD index 1baf0903f618..3f52f93003d6 100644 --- a/source/common/crypto/BUILD +++ b/source/common/crypto/BUILD @@ -19,9 +19,7 @@ envoy_cc_library( "utility.h", "utility_impl.h", ], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], deps = [ "//envoy/buffer:buffer_interface", "//envoy/common/crypto:crypto_interface", diff --git a/source/common/event/BUILD b/source/common/event/BUILD index 659d8e76b0d5..0bcc005674fa 100644 --- a/source/common/event/BUILD +++ b/source/common/event/BUILD @@ -88,8 +88,8 @@ envoy_cc_library( name = "event_impl_base_lib", srcs = ["event_impl_base.cc"], hdrs = ["event_impl_base.h"], - external_deps = [ - "event", + deps = [ + "//bazel/foreign_cc:event", ], ) @@ -133,10 +133,8 @@ envoy_cc_library( name = "libevent_lib", srcs = ["libevent.cc"], hdrs = ["libevent.h"], - external_deps = [ - "event", - ], deps = [ + "//bazel/foreign_cc:event", "//source/common/common:assert_lib", "//source/common/common:c_smart_ptr_lib", ], @@ -146,11 +144,11 @@ envoy_cc_library( name = "libevent_scheduler_lib", srcs = ["libevent_scheduler.cc"], hdrs = ["libevent_scheduler.h"], - external_deps = ["event"], deps = [ ":libevent_lib", ":schedulable_cb_lib", ":timer_lib", + "//bazel/foreign_cc:event", "//envoy/event:dispatcher_interface", "//envoy/event:timer_interface", "//source/common/common:assert_lib", @@ -161,10 +159,10 @@ envoy_cc_library( name = "schedulable_cb_lib", srcs = ["schedulable_cb_impl.cc"], hdrs = ["schedulable_cb_impl.h"], - external_deps = ["event"], deps = [ ":event_impl_base_lib", ":libevent_lib", + "//bazel/foreign_cc:event", "//envoy/event:schedulable_cb_interface", ], ) @@ -173,10 +171,10 @@ envoy_cc_library( name = "timer_lib", srcs = ["timer_impl.cc"], hdrs = ["timer_impl.h"], - external_deps = ["event"], deps = [ ":event_impl_base_lib", ":libevent_lib", + "//bazel/foreign_cc:event", "//envoy/event:timer_interface", "//source/common/common:scope_tracker", "//source/common/common:utility_lib", diff --git a/source/common/filesystem/BUILD b/source/common/filesystem/BUILD index 65f8e0c87bd0..783882d695cc 100644 --- a/source/common/filesystem/BUILD +++ b/source/common/filesystem/BUILD @@ -106,9 +106,6 @@ envoy_cc_library( "inotify/watcher_impl.h", ], }), - external_deps = [ - "event", - ], include_prefix = "source/common/filesystem", strip_include_prefix = select({ "//bazel:apple": "kqueue", @@ -116,6 +113,7 @@ envoy_cc_library( "//conditions:default": "inotify", }), deps = [ + "//bazel/foreign_cc:event", "//envoy/api:api_interface", "//envoy/event:dispatcher_interface", "//source/common/buffer:buffer_lib", diff --git a/source/common/grpc/BUILD b/source/common/grpc/BUILD index 3e183c19e2d1..200d365aec61 100644 --- a/source/common/grpc/BUILD +++ b/source/common/grpc/BUILD @@ -133,9 +133,7 @@ envoy_cc_library( name = "google_grpc_utils_lib", srcs = ["google_grpc_utils.cc"], hdrs = ["google_grpc_utils.h"], - external_deps = [ - "grpc", - ], + external_deps = ["grpc"], deps = [ ":google_grpc_creds_lib", "//envoy/api:api_interface", @@ -166,9 +164,7 @@ envoy_cc_library( name = "google_async_client_lib", srcs = ["google_async_client_impl.cc"], hdrs = ["google_async_client_impl.h"], - external_deps = [ - "grpc", - ], + external_deps = ["grpc"], deps = [ ":context_lib", ":google_grpc_context_lib", diff --git a/source/common/http/BUILD b/source/common/http/BUILD index c9d337388d93..f0dc9190b85c 100644 --- a/source/common/http/BUILD +++ b/source/common/http/BUILD @@ -240,7 +240,6 @@ envoy_cc_library( "http_server_properties_cache_impl.h", "http_server_properties_cache_manager_impl.h", ], - external_deps = ["quiche_quic_platform"], deps = [ ":http3_status_tracker_impl_lib", "//envoy/common:time_interface", @@ -253,6 +252,7 @@ envoy_cc_library( "//source/common/common:logger_lib", "//source/common/config:utility_lib", "@com_github_google_quiche//:http2_core_alt_svc_wire_format_lib", + "@com_github_google_quiche//:quic_platform", "@envoy_api//envoy/config/common/key_value/v3:pkg_cc_proto", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", ], @@ -519,10 +519,6 @@ envoy_cc_library( name = "utility_lib", srcs = ["utility.cc"], hdrs = ["utility.h"], - external_deps = [ - "http_parser", - "quiche_http2_protocol", - ], deps = [ ":character_set_validation_lib", ":exception_lib", @@ -530,6 +526,7 @@ envoy_cc_library( ":headers_lib", ":http_option_limits_lib", ":message_lib", + "//bazel/external/http_parser", "//envoy/common:regex_interface", "//envoy/http:codes_interface", "//envoy/http:filter_interface", @@ -545,6 +542,7 @@ envoy_cc_library( "//source/common/network:utility_lib", "//source/common/protobuf:utility_lib", "//source/common/runtime:runtime_features_lib", + "@com_github_google_quiche//:http2_adapter_http2_protocol", "@com_google_absl//absl/container:node_hash_set", "@com_google_absl//absl/types:optional", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", @@ -556,9 +554,6 @@ envoy_cc_library( name = "header_utility_lib", srcs = ["header_utility.cc"], hdrs = ["header_utility.h"], - external_deps = [ - "quiche_http2_adapter", - ], deps = [ ":character_set_validation_lib", ":header_map_lib", @@ -574,6 +569,7 @@ envoy_cc_library( "//source/common/common:utility_lib", "//source/common/protobuf:utility_lib", "//source/common/runtime:runtime_features_lib", + "@com_github_google_quiche//:http2_adapter", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", "@envoy_api//envoy/config/route/v3:pkg_cc_proto", "@envoy_api//envoy/type/v3:pkg_cc_proto", diff --git a/source/common/http/http1/BUILD b/source/common/http/http1/BUILD index 84f8e2d7c30c..0e31c65919c8 100644 --- a/source/common/http/http1/BUILD +++ b/source/common/http/http1/BUILD @@ -115,9 +115,9 @@ envoy_cc_library( name = "legacy_parser_lib", srcs = ["legacy_parser_impl.cc"], hdrs = ["legacy_parser_impl.h"], - external_deps = ["http_parser"], deps = [ ":parser_interface", + "//bazel/external/http_parser", "//source/common/common:assert_lib", ], ) diff --git a/source/common/http/http2/BUILD b/source/common/http/http2/BUILD index 26fa680b9f25..281377db831e 100644 --- a/source/common/http/http2/BUILD +++ b/source/common/http/http2/BUILD @@ -28,9 +28,6 @@ envoy_cc_library( name = "codec_lib", srcs = ["codec_impl.cc"], hdrs = ["codec_impl.h"], - external_deps = [ - "quiche_http2_adapter", - ], deps = [ ":codec_stats_lib", ":metadata_decoder_lib", @@ -61,6 +58,7 @@ envoy_cc_library( "//source/common/http:utility_lib", "//source/common/network:common_connection_filter_states_lib", "//source/common/runtime:runtime_features_lib", + "@com_github_google_quiche//:http2_adapter", "@com_google_absl//absl/algorithm", "@com_google_absl//absl/cleanup", "@com_google_absl//absl/container:inlined_vector", @@ -97,14 +95,12 @@ envoy_cc_library( name = "metadata_encoder_lib", srcs = ["metadata_encoder.cc"], hdrs = ["metadata_encoder.h"], - external_deps = [ - "quiche_http2_adapter", - ], deps = [ "//envoy/http:codec_interface", "//source/common/buffer:buffer_lib", "//source/common/common:assert_lib", "//source/common/common:minimal_logger_lib", + "@com_github_google_quiche//:http2_adapter", ], ) @@ -112,15 +108,13 @@ envoy_cc_library( name = "metadata_decoder_lib", srcs = ["metadata_decoder.cc"], hdrs = ["metadata_decoder.h"], - external_deps = [ - "quiche_http2_hpack_decoder", - ], deps = [ "//envoy/http:codec_interface", "//source/common/buffer:buffer_lib", "//source/common/common:assert_lib", "//source/common/common:minimal_logger_lib", "//source/common/runtime:runtime_features_lib", + "@com_github_google_quiche//:http2_hpack_decoder_hpack_decoder_lib", ] + envoy_select_nghttp2([envoy_external_dep_path("nghttp2")]), ) diff --git a/source/common/io/BUILD b/source/common/io/BUILD index c3d8166152ac..2b6c2b029fb2 100644 --- a/source/common/io/BUILD +++ b/source/common/io/BUILD @@ -17,9 +17,9 @@ envoy_cc_library( hdrs = [ "io_uring_impl.h", ], - external_deps = ["uring"], tags = ["nocompdb"], deps = [ + "//bazel/foreign_cc:liburing_linux", "//envoy/common/io:io_uring_interface", "//envoy/thread_local:thread_local_interface", ], diff --git a/source/common/json/BUILD b/source/common/json/BUILD index 1ca1e30c9d0f..02ae19bfabf0 100644 --- a/source/common/json/BUILD +++ b/source/common/json/BUILD @@ -12,15 +12,13 @@ envoy_cc_library( name = "json_internal_lib", srcs = ["json_internal.cc"], hdrs = ["json_internal.h"], - external_deps = [ - "json", - ], deps = [ "//envoy/json:json_object_interface", "//source/common/common:assert_lib", "//source/common/common:hash_lib", "//source/common/common:utility_lib", "//source/common/protobuf:utility_lib", + "@com_github_nlohmann_json//:json", ], ) diff --git a/source/common/orca/BUILD b/source/common/orca/BUILD index c558cee04e77..79aa43340804 100644 --- a/source/common/orca/BUILD +++ b/source/common/orca/BUILD @@ -12,13 +12,11 @@ envoy_cc_library( name = "orca_parser", srcs = ["orca_parser.cc"], hdrs = ["orca_parser.h"], - external_deps = [ - "fmtlib", - ], deps = [ "//envoy/http:header_map_interface", "//source/common/common:base64_lib", "@com_github_cncf_xds//xds/data/orca/v3:pkg_cc_proto", + "@com_github_fmtlib_fmt//:fmtlib", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", ], @@ -28,15 +26,13 @@ envoy_cc_library( name = "orca_load_metrics_lib", srcs = ["orca_load_metrics.cc"], hdrs = ["orca_load_metrics.h"], - external_deps = [ - "fmtlib", - ], deps = [ ":orca_parser", "//envoy/http:header_map_interface", "//source/common/http:header_utility_lib", "//source/common/protobuf:utility_lib_header", "@com_github_cncf_xds//xds/data/orca/v3:pkg_cc_proto", + "@com_github_fmtlib_fmt//:fmtlib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", diff --git a/source/common/protobuf/BUILD b/source/common/protobuf/BUILD index fa252699ff10..8c60668ca2a3 100644 --- a/source/common/protobuf/BUILD +++ b/source/common/protobuf/BUILD @@ -34,7 +34,6 @@ envoy_cc_library( name = "message_validator_lib", srcs = ["message_validator_impl.cc"], hdrs = ["message_validator_impl.h"], - external_deps = ["protobuf"], deps = [ "//envoy/protobuf:message_validator_interface", "//envoy/stats:stats_interface", @@ -42,18 +41,17 @@ envoy_cc_library( "//source/common/common:hash_lib", "//source/common/common:logger_lib", "//source/common/common:macros", + "@com_google_protobuf//:protobuf", ], ) envoy_cc_library( name = "protobuf", hdrs = ["protobuf.h"], - external_deps = [ - "protobuf", - ], deps = [ ":cc_wkt_protos", "//envoy/common:base_includes", + "@com_google_protobuf//:protobuf", ], ) @@ -72,10 +70,6 @@ envoy_cc_library( envoy_cc_library( name = "yaml_utility_lib", srcs = envoy_select_enable_yaml(["yaml_utility.cc"]), - external_deps = [ - "protobuf", - "yaml_cpp", - ], deps = [ ":message_validator_lib", ":protobuf", @@ -88,6 +82,8 @@ envoy_cc_library( "//source/common/protobuf:visitor_lib", "//source/common/runtime:runtime_features_lib", "@com_github_cncf_xds//udpa/annotations:pkg_cc_proto", + "@com_github_jbeder_yaml_cpp//:yaml-cpp", + "@com_google_protobuf//:protobuf", "@envoy_api//envoy/annotations:pkg_cc_proto", "@envoy_api//envoy/type/v3:pkg_cc_proto", "@utf8_range//:utf8_validity", @@ -99,11 +95,9 @@ envoy_cc_library( srcs = [ "create_reflectable_message.cc", ], - external_deps = [ - "protobuf", - ], deps = [ "utility_lib_header", + "@com_google_protobuf//:protobuf", ] + envoy_select_enable_lite_protos([ "@envoy_api//bazel/cc_proto_descriptor_library:create_dynamic_message", "@envoy_api//bazel/cc_proto_descriptor_library:text_format_transcoder", @@ -213,9 +207,6 @@ envoy_cc_library( envoy_cc_library( name = "utility_lib", srcs = ["utility.cc"], - external_deps = [ - "protobuf", - ], deps = [ ":deterministic_hash_lib", ":message_validator_lib", @@ -229,6 +220,7 @@ envoy_cc_library( "//source/common/protobuf:visitor_lib", "//source/common/runtime:runtime_features_lib", "@com_github_cncf_xds//udpa/annotations:pkg_cc_proto", + "@com_google_protobuf//:protobuf", "@envoy_api//envoy/annotations:pkg_cc_proto", "@envoy_api//envoy/type/v3:pkg_cc_proto", ] + envoy_select_enable_yaml(["yaml_utility_lib"]), diff --git a/source/common/quic/BUILD b/source/common/quic/BUILD index 62a54d13e6f6..2186c5f6004e 100644 --- a/source/common/quic/BUILD +++ b/source/common/quic/BUILD @@ -21,13 +21,13 @@ envoy_cc_library( name = "envoy_quic_alarm_lib", srcs = ["envoy_quic_alarm.cc"], hdrs = ["envoy_quic_alarm.h"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ "//envoy/event:dispatcher_interface", "//envoy/event:timer_interface", "@com_github_google_quiche//:quic_core_alarm_lib", "@com_github_google_quiche//:quic_core_clock_lib", + "@com_github_google_quiche//:quic_platform", ], ) @@ -35,13 +35,13 @@ envoy_cc_library( name = "envoy_quic_alarm_factory_lib", srcs = ["envoy_quic_alarm_factory.cc"], hdrs = ["envoy_quic_alarm_factory.h"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ ":envoy_quic_alarm_lib", "@com_github_google_quiche//:quic_core_alarm_factory_lib", "@com_github_google_quiche//:quic_core_arena_scoped_ptr_lib", "@com_github_google_quiche//:quic_core_one_block_arena_lib", + "@com_github_google_quiche//:quic_platform", ], ) @@ -100,7 +100,6 @@ envoy_cc_library( name = "envoy_quic_proof_source_base_lib", srcs = ["envoy_quic_proof_source_base.cc"], hdrs = ["envoy_quic_proof_source_base.h"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ ":envoy_quic_utils_lib", @@ -109,6 +108,7 @@ envoy_cc_library( "@com_github_google_quiche//:quic_core_crypto_proof_source_lib", "@com_github_google_quiche//:quic_core_data_lib", "@com_github_google_quiche//:quic_core_versions_lib", + "@com_github_google_quiche//:quic_platform", ], ) @@ -116,9 +116,7 @@ envoy_cc_library( name = "envoy_quic_proof_source_lib", srcs = ["envoy_quic_proof_source.cc"], hdrs = ["envoy_quic_proof_source.h"], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], tags = ["nofips"], deps = [ ":envoy_quic_proof_source_base_lib", @@ -138,13 +136,13 @@ envoy_cc_library( name = "envoy_quic_proof_verifier_base_lib", srcs = ["envoy_quic_proof_verifier_base.cc"], hdrs = ["envoy_quic_proof_verifier_base.h"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ ":envoy_quic_utils_lib", "@com_github_google_quiche//:quic_core_crypto_certificate_view_lib", "@com_github_google_quiche//:quic_core_crypto_crypto_handshake_lib", "@com_github_google_quiche//:quic_core_versions_lib", + "@com_github_google_quiche//:quic_platform", ], ) @@ -152,13 +150,13 @@ envoy_cc_library( name = "envoy_quic_proof_verifier_lib", srcs = ["envoy_quic_proof_verifier.cc"], hdrs = ["envoy_quic_proof_verifier.h"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ ":envoy_quic_proof_verifier_base_lib", ":envoy_quic_utils_lib", ":quic_ssl_connection_info_lib", "//source/common/tls:context_lib", + "@com_github_google_quiche//:quic_platform", ], ) @@ -462,10 +460,7 @@ envoy_cc_library( name = "envoy_quic_utils_lib", srcs = ["envoy_quic_utils.cc"], hdrs = ["envoy_quic_utils.h"], - external_deps = [ - "quiche_quic_platform", - "ssl", - ], + external_deps = ["ssl"], tags = ["nofips"], deps = [ "//envoy/http:codec_interface", @@ -478,6 +473,7 @@ envoy_cc_library( "//source/common/quic:quic_io_handle_wrapper_lib", "@com_github_google_quiche//:quic_core_config_lib", "@com_github_google_quiche//:quic_core_http_header_list_lib", + "@com_github_google_quiche//:quic_platform", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", "@envoy_api//envoy/config/listener/v3:pkg_cc_proto", ], @@ -591,11 +587,11 @@ envoy_cc_library( name = "envoy_quic_packet_writer_lib", srcs = ["envoy_quic_packet_writer.cc"], hdrs = ["envoy_quic_packet_writer.h"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ ":envoy_quic_utils_lib", "@com_github_google_quiche//:quic_core_packet_writer_lib", + "@com_github_google_quiche//:quic_platform", ], ) @@ -606,7 +602,6 @@ envoy_cc_library( "//conditions:default": [], }), hdrs = ["udp_gso_batch_writer.h"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ ":envoy_quic_utils_lib", @@ -614,6 +609,7 @@ envoy_cc_library( "//source/common/network:io_socket_error_lib", "//source/common/protobuf:utility_lib", "//source/common/runtime:runtime_lib", + "@com_github_google_quiche//:quic_platform", ] + select({ "//bazel:linux": ["@com_github_google_quiche//:quic_core_batch_writer_gso_batch_writer_lib"], "//conditions:default": [], @@ -721,11 +717,9 @@ envoy_cc_library( name = "cert_compression_lib", srcs = ["cert_compression.cc"], hdrs = ["cert_compression.h"], - external_deps = [ - "ssl", - "zlib", - ], + external_deps = ["ssl"], deps = [ + "//bazel/foreign_cc:zlib", "//source/common/common:assert_lib", "//source/common/common:logger_lib", "//source/common/runtime:runtime_lib", diff --git a/source/common/stats/BUILD b/source/common/stats/BUILD index b2852de43a58..4e01a6e00729 100644 --- a/source/common/stats/BUILD +++ b/source/common/stats/BUILD @@ -54,15 +54,13 @@ envoy_cc_library( name = "histogram_lib", srcs = ["histogram_impl.cc"], hdrs = ["histogram_impl.h"], - external_deps = [ - "libcircllhist", - ], deps = [ ":metric_impl_lib", "//source/common/common:assert_lib", "//source/common/common:hash_lib", "//source/common/common:matchers_lib", "//source/common/common:utility_lib", + "@com_github_openhistogram_libcircllhist//:libcircllhist", "@envoy_api//envoy/config/metrics/v3:pkg_cc_proto", ], ) diff --git a/source/common/tls/BUILD b/source/common/tls/BUILD index 4a0b1b3b7115..ea7576b8c284 100644 --- a/source/common/tls/BUILD +++ b/source/common/tls/BUILD @@ -63,9 +63,7 @@ envoy_cc_library( name = "ssl_socket_base", srcs = ["ssl_socket.cc"], hdrs = ["ssl_socket.h"], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], # TLS is core functionality. visibility = ["//visibility:public"], deps = [ @@ -98,9 +96,7 @@ envoy_cc_library( name = "client_ssl_socket_lib", srcs = ["client_ssl_socket.cc"], hdrs = ["client_ssl_socket.h"], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], deps = [ ":ssl_socket_base", "@com_google_absl//absl/container:node_hash_set", @@ -114,9 +110,7 @@ envoy_cc_library( name = "server_ssl_socket_lib", srcs = ["server_ssl_socket.cc"], hdrs = ["server_ssl_socket.h"], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], deps = [ ":ssl_socket_base", "@com_google_absl//absl/container:node_hash_set", @@ -138,9 +132,7 @@ envoy_cc_library( name = "context_config_lib", srcs = ["context_config_impl.cc"], hdrs = ["context_config_impl.h"], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], # TLS is core functionality. visibility = ["//visibility:public"], deps = [ @@ -185,9 +177,7 @@ envoy_cc_library( "context_impl.h", "context_manager_impl.h", ], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], # TLS is core functionality. visibility = ["//visibility:public"], deps = [ @@ -243,9 +233,7 @@ envoy_cc_library( name = "stats_lib", srcs = ["stats.cc"], hdrs = ["stats.h"], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], deps = [ "//envoy/stats:stats_interface", "//envoy/stats:stats_macros", @@ -258,9 +246,7 @@ envoy_cc_library( name = "utility_lib", srcs = ["utility.cc"], hdrs = ["utility.h"], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], deps = [ "//source/common/common:assert_lib", "//source/common/common:empty_string", diff --git a/source/common/tls/cert_validator/BUILD b/source/common/tls/cert_validator/BUILD index ed1619c6d52d..63fbe3df359e 100644 --- a/source/common/tls/cert_validator/BUILD +++ b/source/common/tls/cert_validator/BUILD @@ -23,9 +23,7 @@ envoy_cc_library( "san_matcher.h", "utility.h", ], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], visibility = ["//visibility:public"], deps = [ "//envoy/config:typed_config_interface", diff --git a/source/common/upstream/BUILD b/source/common/upstream/BUILD index e96b08a3185a..f974321a7bba 100644 --- a/source/common/upstream/BUILD +++ b/source/common/upstream/BUILD @@ -227,9 +227,7 @@ envoy_cc_library( name = "health_checker_lib", srcs = ["health_checker_impl.cc"], hdrs = ["health_checker_impl.h"], - external_deps = [ - "grpc_health_proto", - ], + external_deps = ["grpc_health_proto"], deps = [ ":health_checker_event_logger_lib", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", diff --git a/source/extensions/access_loggers/fluentd/BUILD b/source/extensions/access_loggers/fluentd/BUILD index 3a7151731baf..73da28b9911d 100644 --- a/source/extensions/access_loggers/fluentd/BUILD +++ b/source/extensions/access_loggers/fluentd/BUILD @@ -23,14 +23,12 @@ envoy_cc_library( name = "fluentd_access_log_lib", srcs = ["fluentd_access_log_impl.cc"], hdrs = ["fluentd_access_log_impl.h"], - external_deps = [ - "msgpack", - ], deps = [ ":substitution_formatter_lib", "//envoy/access_log:access_log_interface", "//source/common/access_log:access_log_lib", "//source/extensions/access_loggers/common:access_log_base", + "@com_github_msgpack_cpp//:msgpack", "@envoy_api//envoy/extensions/access_loggers/fluentd/v3:pkg_cc_proto", ], ) diff --git a/source/extensions/common/dubbo/BUILD b/source/extensions/common/dubbo/BUILD index ec22a68ea7fb..e3e114a4e1eb 100644 --- a/source/extensions/common/dubbo/BUILD +++ b/source/extensions/common/dubbo/BUILD @@ -12,13 +12,11 @@ envoy_cc_library( name = "hessian2_utils_lib", srcs = ["hessian2_utils.cc"], hdrs = ["hessian2_utils.h"], - external_deps = [ - "hessian2_codec_codec_impl", - "hessian2_codec_object_codec_lib", - ], deps = [ "//envoy/buffer:buffer_interface", "//source/common/singleton:const_singleton", + "@com_github_alibaba_hessian2_codec//hessian2:codec_impl_lib", + "@com_github_alibaba_hessian2_codec//hessian2/basic_codec:object_codec_lib", ], ) diff --git a/source/extensions/common/wasm/BUILD b/source/extensions/common/wasm/BUILD index c45b87e20083..1931b851d514 100644 --- a/source/extensions/common/wasm/BUILD +++ b/source/extensions/common/wasm/BUILD @@ -97,8 +97,8 @@ envoy_cc_extension( deps = [ ":wasm_hdr", ":wasm_runtime_factory_interface", + "//bazel/foreign_cc:zlib", "//envoy/server:lifecycle_notifier_interface", - "//external:zlib", "//source/common/buffer:buffer_lib", "//source/common/common:enum_to_int", "//source/common/common:safe_memcpy_lib", diff --git a/source/extensions/common/wasm/ext/BUILD b/source/extensions/common/wasm/ext/BUILD index 352355130696..254f4b12764e 100644 --- a/source/extensions/common/wasm/ext/BUILD +++ b/source/extensions/common/wasm/ext/BUILD @@ -97,7 +97,7 @@ cc_proto_library( name = "node_subset_cc_proto", deps = [ ":node_subset_proto", - # "//external:protobuf_clib", + # "@com_google_protobuf//:protoc_lib", ], ) diff --git a/source/extensions/compression/brotli/compressor/BUILD b/source/extensions/compression/brotli/compressor/BUILD index c8e6e3a8a424..6eb824ae6dc0 100644 --- a/source/extensions/compression/brotli/compressor/BUILD +++ b/source/extensions/compression/brotli/compressor/BUILD @@ -13,11 +13,11 @@ envoy_cc_library( name = "compressor_lib", srcs = ["brotli_compressor_impl.cc"], hdrs = ["brotli_compressor_impl.h"], - external_deps = ["brotlienc"], deps = [ "//envoy/compression/compressor:compressor_interface", "//source/common/buffer:buffer_lib", "//source/extensions/compression/brotli/common:brotli_base_lib", + "@org_brotli//:brotlienc", ], ) diff --git a/source/extensions/compression/brotli/decompressor/BUILD b/source/extensions/compression/brotli/decompressor/BUILD index 18155bfaae36..c5239f0df154 100644 --- a/source/extensions/compression/brotli/decompressor/BUILD +++ b/source/extensions/compression/brotli/decompressor/BUILD @@ -13,7 +13,6 @@ envoy_cc_library( name = "decompressor_lib", srcs = ["brotli_decompressor_impl.cc"], hdrs = ["brotli_decompressor_impl.h"], - external_deps = ["brotlidec"], deps = [ "//envoy/compression/decompressor:decompressor_interface", "//envoy/stats:stats_interface", @@ -21,6 +20,7 @@ envoy_cc_library( "//source/common/buffer:buffer_lib", "//source/common/runtime:runtime_features_lib", "//source/extensions/compression/brotli/common:brotli_base_lib", + "@org_brotli//:brotlidec", ], ) diff --git a/source/extensions/compression/gzip/common/BUILD b/source/extensions/compression/gzip/common/BUILD index 5c301a6a9abe..c843301dd6cc 100644 --- a/source/extensions/compression/gzip/common/BUILD +++ b/source/extensions/compression/gzip/common/BUILD @@ -12,8 +12,8 @@ envoy_cc_library( name = "zlib_base_lib", srcs = ["base.cc"], hdrs = ["base.h"], - external_deps = ["zlib"], deps = [ + "//bazel/foreign_cc:zlib", "//source/common/buffer:buffer_lib", ], ) diff --git a/source/extensions/compression/gzip/compressor/BUILD b/source/extensions/compression/gzip/compressor/BUILD index c138afe6ac74..a7d38764f34a 100644 --- a/source/extensions/compression/gzip/compressor/BUILD +++ b/source/extensions/compression/gzip/compressor/BUILD @@ -13,8 +13,8 @@ envoy_cc_library( name = "compressor_lib", srcs = ["zlib_compressor_impl.cc"], hdrs = ["zlib_compressor_impl.h"], - external_deps = ["zlib"], deps = [ + "//bazel/foreign_cc:zlib", "//envoy/compression/compressor:compressor_interface", "//source/common/buffer:buffer_lib", "//source/common/common:assert_lib", diff --git a/source/extensions/compression/gzip/decompressor/BUILD b/source/extensions/compression/gzip/decompressor/BUILD index 2090f49bcd68..4904d33ac4cc 100644 --- a/source/extensions/compression/gzip/decompressor/BUILD +++ b/source/extensions/compression/gzip/decompressor/BUILD @@ -13,8 +13,8 @@ envoy_cc_library( name = "zlib_decompressor_impl_lib", srcs = ["zlib_decompressor_impl.cc"], hdrs = ["zlib_decompressor_impl.h"], - external_deps = ["zlib"], deps = [ + "//bazel/foreign_cc:zlib", "//envoy/compression/decompressor:decompressor_interface", "//envoy/stats:stats_interface", "//envoy/stats:stats_macros", diff --git a/source/extensions/compression/zstd/common/BUILD b/source/extensions/compression/zstd/common/BUILD index a0aa94556434..eb8f90fb83d8 100644 --- a/source/extensions/compression/zstd/common/BUILD +++ b/source/extensions/compression/zstd/common/BUILD @@ -11,8 +11,8 @@ envoy_extension_package() envoy_cc_library( name = "zstd_dictionary_manager_lib", hdrs = ["dictionary_manager.h"], - external_deps = ["zstd"], deps = [ + "//bazel/foreign_cc:zstd", "//envoy/event:dispatcher_interface", "//envoy/thread_local:thread_local_interface", "//source/common/config:datasource_lib", diff --git a/source/extensions/config_subscription/rest/BUILD b/source/extensions/config_subscription/rest/BUILD index 360ed0cdace4..e7f8051ddf94 100644 --- a/source/extensions/config_subscription/rest/BUILD +++ b/source/extensions/config_subscription/rest/BUILD @@ -13,9 +13,7 @@ envoy_cc_extension( name = "http_subscription_lib", srcs = ["http_subscription_impl.cc"], hdrs = ["http_subscription_impl.h"], - external_deps = [ - "http_api_protos", - ], + external_deps = ["http_api_protos"], extra_visibility = [ # previously considered core code. "//test:__subpackages__", diff --git a/source/extensions/filters/common/lua/BUILD b/source/extensions/filters/common/lua/BUILD index 12d7d0554a67..207abbac99b6 100644 --- a/source/extensions/filters/common/lua/BUILD +++ b/source/extensions/filters/common/lua/BUILD @@ -12,10 +12,8 @@ envoy_cc_library( name = "lua_lib", srcs = ["lua.cc"], hdrs = ["lua.h"], - external_deps = [ - "luajit", - ], deps = [ + "//bazel/foreign_cc:luajit", "//envoy/thread_local:thread_local_interface", "//source/common/common:assert_lib", "//source/common/common:c_smart_ptr_lib", diff --git a/source/extensions/filters/http/adaptive_concurrency/controller/BUILD b/source/extensions/filters/http/adaptive_concurrency/controller/BUILD index 60cb03dd31d2..abceffc527c2 100644 --- a/source/extensions/filters/http/adaptive_concurrency/controller/BUILD +++ b/source/extensions/filters/http/adaptive_concurrency/controller/BUILD @@ -19,9 +19,6 @@ envoy_cc_library( "controller.h", "gradient_controller.h", ], - external_deps = [ - "libcircllhist", - ], deps = [ "//envoy/common:time_interface", "//source/common/common:thread_synchronizer_lib", @@ -30,6 +27,7 @@ envoy_cc_library( "//source/common/runtime:runtime_lib", "//source/common/stats:isolated_store_lib", "//source/common/stats:stats_lib", + "@com_github_openhistogram_libcircllhist//:libcircllhist", "@envoy_api//envoy/extensions/filters/http/adaptive_concurrency/v3:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/common/BUILD b/source/extensions/filters/http/common/BUILD index 7bc4eea7f456..73d4be20fbe9 100644 --- a/source/extensions/filters/http/common/BUILD +++ b/source/extensions/filters/http/common/BUILD @@ -31,12 +31,10 @@ envoy_cc_library( name = "jwks_fetcher_lib", srcs = ["jwks_fetcher.cc"], hdrs = ["jwks_fetcher.h"], - external_deps = [ - "jwt_verify_lib", - ], deps = [ "//envoy/upstream:cluster_manager_interface", "//source/common/http:utility_lib", + "@com_github_google_jwt_verify//:jwt_verify_lib", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", "@envoy_api//envoy/extensions/filters/http/jwt_authn/v3:pkg_cc_proto", ], diff --git a/source/extensions/filters/http/gcp_authn/BUILD b/source/extensions/filters/http/gcp_authn/BUILD index ecb021ee000c..2dd2e7daa00c 100644 --- a/source/extensions/filters/http/gcp_authn/BUILD +++ b/source/extensions/filters/http/gcp_authn/BUILD @@ -44,16 +44,14 @@ envoy_cc_library( envoy_cc_library( name = "token_cache", hdrs = ["token_cache.h"], - external_deps = [ - "jwt_verify_lib", - "simple_lru_cache_lib", - ], deps = [ "//source/common/http:headers_lib", "//source/common/http:message_lib", "//source/common/http:utility_lib", "//source/extensions/filters/http/common:factory_base_lib", "//source/extensions/filters/http/common:pass_through_filter_lib", + "@com_github_google_jwt_verify//:jwt_verify_lib", + "@com_github_google_jwt_verify//:simple_lru_cache_lib", "@envoy_api//envoy/extensions/filters/http/gcp_authn/v3:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/grpc_field_extraction/BUILD b/source/extensions/filters/http/grpc_field_extraction/BUILD index 929124b0a68d..ae910dc83457 100644 --- a/source/extensions/filters/http/grpc_field_extraction/BUILD +++ b/source/extensions/filters/http/grpc_field_extraction/BUILD @@ -24,9 +24,7 @@ envoy_cc_library( name = "extractor_impl", srcs = ["extractor_impl.cc"], hdrs = ["extractor_impl.h"], - external_deps = [ - "grpc_transcoding", - ], + external_deps = ["grpc_transcoding"], deps = [ "extractor", "//source/common/common:minimal_logger_lib", @@ -52,9 +50,7 @@ envoy_cc_library( name = "filter", srcs = ["filter.cc"], hdrs = ["filter.h"], - external_deps = [ - "grpc_transcoding", - ], + external_deps = ["grpc_transcoding"], deps = [ "extractor_impl", "filter_config", diff --git a/source/extensions/filters/http/grpc_json_transcoder/BUILD b/source/extensions/filters/http/grpc_json_transcoder/BUILD index 7a8455a241b8..fa88fe00dbb1 100644 --- a/source/extensions/filters/http/grpc_json_transcoder/BUILD +++ b/source/extensions/filters/http/grpc_json_transcoder/BUILD @@ -43,9 +43,7 @@ envoy_cc_library( name = "http_body_utils_lib", srcs = ["http_body_utils.cc"], hdrs = ["http_body_utils.h"], - external_deps = [ - "api_httpbody_protos", - ], + external_deps = ["api_httpbody_protos"], deps = [ "//source/common/grpc:codec_lib", "//source/common/protobuf", diff --git a/source/extensions/filters/http/jwt_authn/BUILD b/source/extensions/filters/http/jwt_authn/BUILD index ccf0af7f35ba..c01f977750ba 100644 --- a/source/extensions/filters/http/jwt_authn/BUILD +++ b/source/extensions/filters/http/jwt_authn/BUILD @@ -34,9 +34,6 @@ envoy_cc_library( name = "jwks_async_fetcher_lib", srcs = ["jwks_async_fetcher.cc"], hdrs = ["jwks_async_fetcher.h"], - external_deps = [ - "jwt_verify_lib", - ], deps = [ ":stats_lib", "//envoy/server:factory_context_interface", @@ -45,6 +42,7 @@ envoy_cc_library( "//source/common/protobuf:utility_lib", "//source/common/tracing:http_tracer_lib", "//source/extensions/filters/http/common:jwks_fetcher_lib", + "@com_github_google_jwt_verify//:jwt_verify_lib", "@envoy_api//envoy/extensions/filters/http/jwt_authn/v3:pkg_cc_proto", ], ) @@ -53,13 +51,11 @@ envoy_cc_library( name = "jwks_cache_lib", srcs = ["jwks_cache.cc"], hdrs = ["jwks_cache.h"], - external_deps = [ - "jwt_verify_lib", - ], deps = [ "jwks_async_fetcher_lib", ":jwt_cache_lib", "//source/common/config:datasource_lib", + "@com_github_google_jwt_verify//:jwt_verify_lib", "@envoy_api//envoy/extensions/filters/http/jwt_authn/v3:pkg_cc_proto", ], ) @@ -83,14 +79,12 @@ envoy_cc_library( name = "filter_lib", srcs = ["filter.cc"], hdrs = ["filter.h"], - external_deps = [ - "jwt_verify_lib", - ], deps = [ ":filter_config_lib", ":matchers_lib", "//envoy/http:filter_interface", "//source/common/http:headers_lib", + "@com_github_google_jwt_verify//:jwt_verify_lib", ], ) @@ -151,12 +145,10 @@ envoy_cc_library( name = "jwt_cache_lib", srcs = ["jwt_cache.cc"], hdrs = ["jwt_cache.h"], - external_deps = [ - "jwt_verify_lib", - "simple_lru_cache_lib", - ], deps = [ "//source/common/protobuf:utility_lib", + "@com_github_google_jwt_verify//:jwt_verify_lib", + "@com_github_google_jwt_verify//:simple_lru_cache_lib", "@envoy_api//envoy/extensions/filters/http/jwt_authn/v3:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/oauth2/BUILD b/source/extensions/filters/http/oauth2/BUILD index 5438db7cb9ae..5874d69036c6 100644 --- a/source/extensions/filters/http/oauth2/BUILD +++ b/source/extensions/filters/http/oauth2/BUILD @@ -44,9 +44,6 @@ envoy_cc_library( name = "oauth_lib", srcs = ["filter.cc"], hdrs = ["filter.h"], - external_deps = [ - "jwt_verify_lib", - ], deps = [ ":oauth_client", "//envoy/server:filter_config_interface", @@ -59,6 +56,7 @@ envoy_cc_library( "//source/common/protobuf:utility_lib", "//source/common/secret:secret_provider_impl_lib", "//source/extensions/filters/http/common:pass_through_filter_lib", + "@com_github_google_jwt_verify//:jwt_verify_lib", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", "@envoy_api//envoy/extensions/filters/http/oauth2/v3:pkg_cc_proto", ], diff --git a/source/extensions/filters/listener/http_inspector/BUILD b/source/extensions/filters/listener/http_inspector/BUILD index a0fc9a0bfde3..fc5dec01f9d4 100644 --- a/source/extensions/filters/listener/http_inspector/BUILD +++ b/source/extensions/filters/listener/http_inspector/BUILD @@ -15,8 +15,8 @@ envoy_cc_library( name = "http_inspector_lib", srcs = ["http_inspector.cc"], hdrs = ["http_inspector.h"], - external_deps = ["http_parser"], deps = [ + "//bazel/external/http_parser", "//envoy/event:dispatcher_interface", "//envoy/event:timer_interface", "//envoy/network:filter_interface", diff --git a/source/extensions/filters/network/dubbo_proxy/BUILD b/source/extensions/filters/network/dubbo_proxy/BUILD index 909bb29b7fd7..09edc7e358ea 100644 --- a/source/extensions/filters/network/dubbo_proxy/BUILD +++ b/source/extensions/filters/network/dubbo_proxy/BUILD @@ -13,13 +13,11 @@ envoy_cc_library( name = "hessian_utils_lib", srcs = ["hessian_utils.cc"], hdrs = ["hessian_utils.h"], - external_deps = [ - "hessian2_codec_codec_impl", - "hessian2_codec_object_codec_lib", - ], deps = [ "//envoy/buffer:buffer_interface", "//source/common/singleton:const_singleton", + "@com_github_alibaba_hessian2_codec//hessian2:codec_impl_lib", + "@com_github_alibaba_hessian2_codec//hessian2/basic_codec:object_codec_lib", ], ) diff --git a/source/extensions/filters/udp/dns_filter/BUILD b/source/extensions/filters/udp/dns_filter/BUILD index ebb9bff32933..e4315f1acc15 100644 --- a/source/extensions/filters/udp/dns_filter/BUILD +++ b/source/extensions/filters/udp/dns_filter/BUILD @@ -24,8 +24,8 @@ envoy_cc_library( "dns_filter_utils.h", "dns_parser.h", ], - external_deps = ["ares"], deps = [ + "//bazel/foreign_cc:ares", "//envoy/buffer:buffer_interface", "//envoy/event:dispatcher_interface", "//envoy/network:address_interface", diff --git a/source/extensions/health_checkers/grpc/BUILD b/source/extensions/health_checkers/grpc/BUILD index 8507c827778c..c06822d4e75c 100644 --- a/source/extensions/health_checkers/grpc/BUILD +++ b/source/extensions/health_checkers/grpc/BUILD @@ -12,9 +12,7 @@ envoy_cc_extension( name = "health_checker_lib", srcs = ["health_checker_impl.cc"], hdrs = ["health_checker_impl.h"], - external_deps = [ - "grpc_health_proto", - ], + external_deps = ["grpc_health_proto"], extra_visibility = [ # previously considered core code. "//test:__subpackages__", diff --git a/source/extensions/network/dns_resolver/cares/BUILD b/source/extensions/network/dns_resolver/cares/BUILD index bb9c3a94f78b..7a8a92fa61ad 100644 --- a/source/extensions/network/dns_resolver/cares/BUILD +++ b/source/extensions/network/dns_resolver/cares/BUILD @@ -12,9 +12,9 @@ envoy_cc_extension( name = "config", srcs = ["dns_impl.cc"], hdrs = ["dns_impl.h"], - external_deps = ["ares"], visibility = ["//visibility:public"], deps = [ + "//bazel/foreign_cc:ares", "//envoy/event:dispatcher_interface", "//envoy/event:file_event_interface", "//envoy/network:dns_interface", diff --git a/source/extensions/tracers/datadog/BUILD b/source/extensions/tracers/datadog/BUILD index cd7327a67d09..85dfb3d1d0c3 100644 --- a/source/extensions/tracers/datadog/BUILD +++ b/source/extensions/tracers/datadog/BUILD @@ -37,9 +37,6 @@ envoy_cc_library( # equivalents of std::string_view and std::optional. "-DDD_USE_ABSEIL_FOR_ENVOY", ], - external_deps = [ - "dd_trace_cpp", - ], deps = [ "//source/common/config:utility_lib", "//source/common/http:async_client_utility_lib", @@ -51,6 +48,7 @@ envoy_cc_library( "//source/common/upstream:cluster_update_tracker_lib", "//source/common/version:version_lib", "//source/extensions/tracers/common:factory_base_lib", + "@com_github_datadog_dd_trace_cpp//:dd_trace_cpp", ], ) diff --git a/source/extensions/tracers/opencensus/BUILD b/source/extensions/tracers/opencensus/BUILD index f661bed6ddf6..51c454f51c8c 100644 --- a/source/extensions/tracers/opencensus/BUILD +++ b/source/extensions/tracers/opencensus/BUILD @@ -28,20 +28,18 @@ envoy_cc_library( srcs = ["opencensus_tracer_impl.cc"], hdrs = ["opencensus_tracer_impl.h"], copts = ["-Wno-unused-parameter"], - external_deps = [ - "opencensus_trace", - "opencensus_trace_b3", - "opencensus_trace_cloud_trace_context", - "opencensus_trace_grpc_trace_bin", - "opencensus_trace_trace_context", - "opencensus_exporter_ocagent", - "opencensus_exporter_stdout", - "opencensus_exporter_stackdriver", - "opencensus_exporter_zipkin", - ], deps = [ "//source/common/config:utility_lib", "//source/common/tracing:http_tracer_lib", "@envoy_api//envoy/config/trace/v3:pkg_cc_proto", + "@io_opencensus_cpp//opencensus/exporters/trace/ocagent:ocagent_exporter", + "@io_opencensus_cpp//opencensus/exporters/trace/stackdriver:stackdriver_exporter", + "@io_opencensus_cpp//opencensus/exporters/trace/stdout:stdout_exporter", + "@io_opencensus_cpp//opencensus/exporters/trace/zipkin:zipkin_exporter", + "@io_opencensus_cpp//opencensus/trace", + "@io_opencensus_cpp//opencensus/trace:b3", + "@io_opencensus_cpp//opencensus/trace:cloud_trace_context", + "@io_opencensus_cpp//opencensus/trace:grpc_trace_bin", + "@io_opencensus_cpp//opencensus/trace:trace_context", ] + envoy_select_google_grpc(["//source/common/grpc:google_async_client_lib"]), ) diff --git a/source/extensions/tracers/opentelemetry/BUILD b/source/extensions/tracers/opentelemetry/BUILD index bcc2e7526a3e..0b6e75abea09 100644 --- a/source/extensions/tracers/opentelemetry/BUILD +++ b/source/extensions/tracers/opentelemetry/BUILD @@ -40,7 +40,6 @@ envoy_cc_library( # https://github.com/open-telemetry/opentelemetry-cpp/blob/v1.14.0/api/BUILD#L32 "-DHAVE_ABSEIL", ], - external_deps = ["opentelemetry_api"], deps = [ ":trace_exporter", "//envoy/thread_local:thread_local_interface", @@ -50,6 +49,7 @@ envoy_cc_library( "//source/extensions/tracers/opentelemetry/resource_detectors:resource_detector_lib", "//source/extensions/tracers/opentelemetry/samplers:sampler_lib", "@envoy_api//envoy/config/trace/v3:pkg_cc_proto", + "@io_opentelemetry_cpp//api", "@opentelemetry_proto//:trace_cc_proto", ], ) @@ -67,7 +67,6 @@ envoy_cc_library( "otlp_utils.h", "trace_exporter.h", ], - external_deps = ["opentelemetry_api"], deps = [ "//envoy/grpc:async_client_manager_interface", "//envoy/upstream:cluster_manager_interface", @@ -80,6 +79,7 @@ envoy_cc_library( "//source/common/tracing:trace_context_lib", "//source/common/version:version_lib", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", + "@io_opentelemetry_cpp//api", "@opentelemetry_proto//:trace_cc_proto", ], ) diff --git a/source/extensions/tracers/skywalking/BUILD b/source/extensions/tracers/skywalking/BUILD index b4c33f87860a..2c376371a72c 100644 --- a/source/extensions/tracers/skywalking/BUILD +++ b/source/extensions/tracers/skywalking/BUILD @@ -15,14 +15,12 @@ envoy_cc_library( name = "trace_segment_reporter_lib", srcs = ["trace_segment_reporter.cc"], hdrs = ["trace_segment_reporter.h"], - external_deps = [ - "cpp2sky", - ], deps = [ ":skywalking_stats_lib", "//envoy/grpc:async_client_manager_interface", "//source/common/common:backoff_lib", "//source/common/grpc:async_client_lib", + "@com_github_skyapm_cpp2sky//source:cpp2sky_data_lib", "@envoy_api//envoy/config/trace/v3:pkg_cc_proto", ], ) @@ -37,9 +35,6 @@ envoy_cc_library( "skywalking_tracer_impl.h", "tracer.h", ], - external_deps = [ - "cpp2sky", - ], deps = [ ":trace_segment_reporter_lib", "//envoy/common:time_interface", @@ -49,6 +44,7 @@ envoy_cc_library( "//source/common/http:header_map_lib", "//source/common/runtime:runtime_lib", "//source/common/tracing:http_tracer_lib", + "@com_github_skyapm_cpp2sky//source:cpp2sky_data_lib", "@envoy_api//envoy/config/trace/v3:pkg_cc_proto", ], ) diff --git a/source/extensions/tracers/xray/BUILD b/source/extensions/tracers/xray/BUILD index e13753344d6a..78cfd6c78585 100644 --- a/source/extensions/tracers/xray/BUILD +++ b/source/extensions/tracers/xray/BUILD @@ -36,7 +36,6 @@ envoy_cc_library( "xray_configuration.h", "xray_tracer_impl.h", ], - external_deps = [], deps = [ ":daemon_cc_proto", "//envoy/common:time_interface", diff --git a/source/extensions/transport_sockets/alts/BUILD b/source/extensions/transport_sockets/alts/BUILD index 7d66d8dd9bd3..cd32ac0ca87b 100644 --- a/source/extensions/transport_sockets/alts/BUILD +++ b/source/extensions/transport_sockets/alts/BUILD @@ -18,9 +18,7 @@ envoy_cc_library( hdrs = [ "grpc_tsi.h", ], - external_deps = [ - "grpc", - ], + external_deps = ["grpc"], visibility = ["//visibility:private"], deps = [ "//source/common/common:c_smart_ptr_lib", @@ -115,9 +113,7 @@ envoy_cc_library( name = "alts_channel_pool", srcs = ["alts_channel_pool.cc"], hdrs = ["alts_channel_pool.h"], - external_deps = [ - "grpc", - ], + external_deps = ["grpc"], deps = [ "@com_google_absl//absl/random", ], @@ -132,9 +128,7 @@ envoy_cc_library( name = "alts_proxy", srcs = ["alts_proxy.cc"], hdrs = ["alts_proxy.h"], - external_deps = [ - "grpc", - ], + external_deps = ["grpc"], deps = [ ":handshaker_cc_grpc", "@com_google_absl//absl/memory", @@ -147,9 +141,7 @@ envoy_cc_library( name = "alts_tsi_handshaker", srcs = ["alts_tsi_handshaker.cc"], hdrs = ["alts_tsi_handshaker.h"], - external_deps = [ - "grpc", - ], + external_deps = ["grpc"], deps = [ ":alts_proxy", ":handshaker_cc_grpc", diff --git a/source/extensions/transport_sockets/starttls/BUILD b/source/extensions/transport_sockets/starttls/BUILD index 1117a147ab57..ec4bbbe5d5f7 100644 --- a/source/extensions/transport_sockets/starttls/BUILD +++ b/source/extensions/transport_sockets/starttls/BUILD @@ -29,9 +29,7 @@ envoy_cc_library( name = "starttls_socket_lib", srcs = ["starttls_socket.cc"], hdrs = ["starttls_socket.h"], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], deps = [ "//envoy/network:connection_interface", "//envoy/network:transport_socket_interface", diff --git a/source/extensions/transport_sockets/tls/cert_validator/spiffe/BUILD b/source/extensions/transport_sockets/tls/cert_validator/spiffe/BUILD index 150928e55350..0de73d027e23 100644 --- a/source/extensions/transport_sockets/tls/cert_validator/spiffe/BUILD +++ b/source/extensions/transport_sockets/tls/cert_validator/spiffe/BUILD @@ -16,9 +16,7 @@ envoy_cc_extension( hdrs = [ "spiffe_validator.h", ], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], deps = [ "//envoy/ssl:context_config_interface", "//envoy/ssl:ssl_socket_extended_info_interface", diff --git a/source/server/BUILD b/source/server/BUILD index 7420331d1fc1..300b859024e9 100644 --- a/source/server/BUILD +++ b/source/server/BUILD @@ -267,11 +267,10 @@ envoy_cc_library( envoy_cc_library( name = "options_lib", - # TCLAP command line parser needs this to support int64_t/uint64_t in several build environments. srcs = ["options_impl.cc"], hdrs = ["options_impl.h"], + # TCLAP command line parser needs this to support int64_t/uint64_t in several build environments. copts = ["-DHAVE_LONG_LONG"], - external_deps = ["tclap"], deps = [ ":options_base", "//envoy/network:address_interface", @@ -285,6 +284,7 @@ envoy_cc_library( "//source/common/stats:stats_lib", "//source/common/stats:tag_utility_lib", "//source/common/version:version_lib", + "@com_github_mirror_tclap//:tclap", "@envoy_api//envoy/admin/v3:pkg_cc_proto", "@envoy_api//envoy/config/bootstrap/v3:pkg_cc_proto", ], diff --git a/test/BUILD b/test/BUILD index d8ad1e080cd3..b4711e655121 100644 --- a/test/BUILD +++ b/test/BUILD @@ -56,10 +56,6 @@ envoy_cc_test_library( envoy_pch_library( name = "test_pch", testonly = True, - external_deps = [ - "googletest", - "spdlog", - ], includes = [ "envoy/config/bootstrap/v3/bootstrap.pb.h", "envoy/config/cluster/v3/cluster.pb.h", @@ -93,6 +89,8 @@ envoy_pch_library( "//test/mocks/server:factory_context_mocks", "//test/mocks/server:instance_mocks", "//test/mocks/stats:stats_mocks", + "@com_github_gabime_spdlog//:spdlog", + "@com_google_googletest//:gtest", "@envoy_api//envoy/config/bootstrap/v3:pkg_cc_proto", "@envoy_api//envoy/config/cluster/v3:pkg_cc_proto", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", diff --git a/test/benchmark/BUILD b/test/benchmark/BUILD index 7d14fd5f4cb7..73b358abb308 100644 --- a/test/benchmark/BUILD +++ b/test/benchmark/BUILD @@ -12,15 +12,13 @@ envoy_cc_test_library( name = "main", srcs = ["main.cc"], hdrs = ["main.h"], - external_deps = [ - "benchmark", - "tclap", - ], deps = [ "//source/common/common:minimal_logger_lib", "//source/common/common:thread_lib", "//test/test_common:environment_lib", "//test/test_common:printers_lib", "//test/test_common:test_runtime_lib", + "@com_github_google_benchmark//:benchmark", + "@com_github_mirror_tclap//:tclap", ], ) diff --git a/test/common/buffer/BUILD b/test/common/buffer/BUILD index 1a6841bb6730..027e7aaf6d43 100644 --- a/test/common/buffer/BUILD +++ b/test/common/buffer/BUILD @@ -117,12 +117,10 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "buffer_speed_test", srcs = ["buffer_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/buffer:buffer_lib", "//source/common/buffer:watermark_buffer_lib", + "@com_github_google_benchmark//:benchmark", "@envoy_api//envoy/config/overload/v3:pkg_cc_proto", ], ) diff --git a/test/common/common/BUILD b/test/common/common/BUILD index cac07a646af6..96ad095dab9a 100644 --- a/test/common/common/BUILD +++ b/test/common/common/BUILD @@ -197,8 +197,10 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "logger_speed_test", srcs = ["logger_speed_test.cc"], - external_deps = ["benchmark"], - deps = ["//source/common/common:minimal_logger_lib"], + deps = [ + "//source/common/common:minimal_logger_lib", + "@com_github_google_benchmark//:benchmark", + ], ) envoy_benchmark_test( @@ -371,10 +373,10 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "re_speed_test", srcs = ["re_speed_test.cc"], - external_deps = ["benchmark"], deps = [ "//source/common/common:assert_lib", "//source/common/common:utility_lib", + "@com_github_google_benchmark//:benchmark", "@com_googlesource_code_re2//:re2", ], ) @@ -382,12 +384,10 @@ envoy_cc_benchmark_binary( envoy_cc_benchmark_binary( name = "utility_speed_test", srcs = ["utility_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/common:assert_lib", "//source/common/common:utility_lib", + "@com_github_google_benchmark//:benchmark", "@com_google_absl//absl/strings", ], ) @@ -400,11 +400,9 @@ envoy_benchmark_test( envoy_cc_benchmark_binary( name = "trie_lookup_table_speed_test", srcs = ["trie_lookup_table_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/common:trie_lookup_table_lib", + "@com_github_google_benchmark//:benchmark", "@com_google_absl//absl/strings", ], ) @@ -529,8 +527,10 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "inline_map_speed_test", srcs = ["inline_map_speed_test.cc"], - external_deps = ["benchmark"], - deps = ["//source/common/common:inline_map"], + deps = [ + "//source/common/common:inline_map", + "@com_github_google_benchmark//:benchmark", + ], ) envoy_benchmark_test( diff --git a/test/common/crypto/BUILD b/test/common/crypto/BUILD index a3d8272da24e..d85fe7c034eb 100644 --- a/test/common/crypto/BUILD +++ b/test/common/crypto/BUILD @@ -15,9 +15,7 @@ envoy_cc_test( srcs = [ "utility_test.cc", ], - external_deps = [ - "ssl", - ], + external_deps = ["ssl"], deps = [ "//source/common/buffer:buffer_lib", "//source/common/common:hex_lib", diff --git a/test/common/formatter/BUILD b/test/common/formatter/BUILD index 661e19a6aff5..544346222fbc 100644 --- a/test/common/formatter/BUILD +++ b/test/common/formatter/BUILD @@ -92,9 +92,6 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "substitution_formatter_speed_test", srcs = ["substitution_formatter_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/formatter:formatter_extension_lib", "//source/common/formatter:substitution_formatter_lib", @@ -104,6 +101,7 @@ envoy_cc_benchmark_binary( "//test/mocks/http:http_mocks", "//test/mocks/stream_info:stream_info_mocks", "//test/test_common:printers_lib", + "@com_github_google_benchmark//:benchmark", ], ) diff --git a/test/common/grpc/BUILD b/test/common/grpc/BUILD index ac4ebe2684e1..40934f3e5eff 100644 --- a/test/common/grpc/BUILD +++ b/test/common/grpc/BUILD @@ -225,9 +225,6 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "async_client_manager_benchmark", srcs = ["async_client_manager_benchmark.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/api:api_lib", "//source/common/grpc:async_client_manager_lib", @@ -238,6 +235,7 @@ envoy_cc_benchmark_binary( "//test/mocks/upstream:cluster_priority_set_mocks", "//test/test_common:test_runtime_lib", "//test/test_common:utility_lib", + "@com_github_google_benchmark//:benchmark", "@envoy_api//envoy/config/bootstrap/v3:pkg_cc_proto", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", ], diff --git a/test/common/http/BUILD b/test/common/http/BUILD index 98b1e1be8adf..565dbfddf8a9 100644 --- a/test/common/http/BUILD +++ b/test/common/http/BUILD @@ -164,13 +164,11 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "codes_speed_test", srcs = ["codes_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/http:codes_lib", "//source/common/stats:isolated_store_lib", "//source/common/stats:stats_lib", + "@com_github_google_benchmark//:benchmark", ], ) @@ -333,11 +331,9 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "header_map_impl_speed_test", srcs = ["header_map_impl_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/http:header_map_lib", + "@com_github_google_benchmark//:benchmark", ], ) diff --git a/test/common/http/http2/BUILD b/test/common/http/http2/BUILD index f6a8835d4298..04b9c8a8c242 100644 --- a/test/common/http/http2/BUILD +++ b/test/common/http/http2/BUILD @@ -15,9 +15,6 @@ envoy_cc_test( name = "codec_impl_test", size = "large", srcs = ["codec_impl_test.cc"], - external_deps = [ - "quiche_http2_adapter", - ], shard_count = 5, deps = [ ":codec_impl_test_util", @@ -46,19 +43,18 @@ envoy_cc_test( "//test/test_common:registry_lib", "//test/test_common:test_runtime_lib", "//test/test_common:utility_lib", + "@com_github_google_quiche//:http2_adapter", ], ) envoy_cc_test_library( name = "codec_impl_test_util", hdrs = ["codec_impl_test_util.h"], - external_deps = [ - "quiche_http2_adapter", - ], deps = [ "//source/common/http/http2:codec_lib", "//test/mocks:common_lib", "//test/mocks/server:overload_manager_mocks", + "@com_github_google_quiche//:http2_adapter", "@com_google_absl//absl/types:optional", ], ) @@ -89,15 +85,13 @@ envoy_cc_test_library( name = "http2_frame", srcs = ["http2_frame.cc"], hdrs = ["http2_frame.h"], - external_deps = [ - "quiche_http2_hpack", - ], deps = [ "//envoy/http:metadata_interface_with_external_headers", "//source/common/buffer:buffer_lib", "//source/common/common:assert_lib", "//source/common/common:hex_lib", "//source/common/common:macros", + "@com_github_google_quiche//:http2_hpack_hpack_lib", ], ) @@ -137,10 +131,6 @@ envoy_cc_test( envoy_cc_test( name = "metadata_encoder_test", srcs = ["metadata_encoder_test.cc"], - external_deps = [ - "quiche_http2_adapter", - "quiche_http2_test_tools", - ], deps = [ "//source/common/buffer:buffer_lib", "//source/common/common:random_generator_lib", @@ -151,6 +141,8 @@ envoy_cc_test( "//test/test_common:logging_lib", "//test/test_common:test_runtime_lib", "//test/test_common:utility_lib", + "@com_github_google_quiche//:http2_adapter", + "@com_github_google_quiche//:http2_adapter_mock_http2_visitor", ], ) @@ -207,9 +199,7 @@ envoy_cc_fuzz_test( name = "hpack_fuzz_test", srcs = ["hpack_fuzz_test.cc"], corpus = "hpack_corpus", - external_deps = [ - "nghttp2", - ], + external_deps = ["nghttp2"], deps = [ ":hpack_fuzz_proto_cc_proto", "//test/test_common:utility_lib", @@ -226,9 +216,7 @@ envoy_cc_fuzz_test( name = "http2_connection_fuzz_test", srcs = ["http2_connection_fuzz_test.cc"], corpus = "http2_connection_corpus", - external_deps = [ - "nghttp2", - ], + external_deps = ["nghttp2"], deps = [ ":http2_connection_proto_cc_proto", "//source/common/http/http2:codec_lib", diff --git a/test/common/listener_manager/BUILD b/test/common/listener_manager/BUILD index 35780b1bfaf2..484a147a49d0 100644 --- a/test/common/listener_manager/BUILD +++ b/test/common/listener_manager/BUILD @@ -184,12 +184,7 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "filter_chain_benchmark_test", srcs = ["filter_chain_benchmark_test.cc"], - external_deps = [ - "benchmark", - "googletest", - ], deps = [ - "@envoy_api//envoy/config/listener/v3:pkg_cc_proto", "//source/common/listener_manager:filter_chain_manager_lib", "//test/test_common:environment_lib", "//test/mocks/network:network_mocks", @@ -197,6 +192,9 @@ envoy_cc_benchmark_binary( "//test/mocks/stream_info:stream_info_mocks", # tranport socket config registration "//source/extensions/transport_sockets/tls:config", + "@com_github_google_benchmark//:benchmark", + "@com_google_googletest//:gtest", + "@envoy_api//envoy/config/listener/v3:pkg_cc_proto", ], ) diff --git a/test/common/network/BUILD b/test/common/network/BUILD index 8c7e54a68917..036c23c15dcf 100644 --- a/test/common/network/BUILD +++ b/test/common/network/BUILD @@ -50,11 +50,9 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "address_impl_speed_test", srcs = ["address_impl_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/network:address_lib", + "@com_github_google_benchmark//:benchmark", ], ) @@ -408,12 +406,10 @@ envoy_cc_fuzz_test( envoy_cc_benchmark_binary( name = "lc_trie_speed_test", srcs = ["lc_trie_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/network:lc_trie_lib", "//source/common/network:utility_lib", + "@com_github_google_benchmark//:benchmark", ], ) diff --git a/test/common/orca/BUILD b/test/common/orca/BUILD index c63c06cd9e5a..35e25fc6b301 100644 --- a/test/common/orca/BUILD +++ b/test/common/orca/BUILD @@ -11,15 +11,13 @@ envoy_package() envoy_cc_test( name = "orca_load_metrics_test", srcs = ["orca_load_metrics_test.cc"], - external_deps = [ - "fmtlib", - ], deps = [ "//source/common/orca:orca_load_metrics_lib", "//source/common/upstream:upstream_lib", "//test/test_common:status_utility_lib", "//test/test_common:utility_lib", "@com_github_cncf_xds//xds/data/orca/v3:pkg_cc_proto", + "@com_github_fmtlib_fmt//:fmtlib", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", ], @@ -28,15 +26,13 @@ envoy_cc_test( envoy_cc_test( name = "orca_parser_test", srcs = ["orca_parser_test.cc"], - external_deps = [ - "fmtlib", - ], deps = [ "//source/common/common:base64_lib", "//source/common/orca:orca_parser", "//test/test_common:status_utility_lib", "//test/test_common:utility_lib", "@com_github_cncf_xds//xds/data/orca/v3:pkg_cc_proto", + "@com_github_fmtlib_fmt//:fmtlib", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", ], diff --git a/test/common/protobuf/BUILD b/test/common/protobuf/BUILD index befefa24b657..c1fe7afdebf9 100644 --- a/test/common/protobuf/BUILD +++ b/test/common/protobuf/BUILD @@ -102,11 +102,11 @@ envoy_cc_fuzz_test( envoy_cc_benchmark_binary( name = "utility_speed_test", srcs = ["utility_speed_test.cc"], - external_deps = ["benchmark"], deps = [ ":deterministic_hash_test_proto_cc_proto", "//source/common/protobuf:utility_lib", "//test/test_common:test_runtime_lib", + "@com_github_google_benchmark//:benchmark", ], ) diff --git a/test/common/quic/BUILD b/test/common/quic/BUILD index 938238aafdf4..71fa7de6818a 100644 --- a/test/common/quic/BUILD +++ b/test/common/quic/BUILD @@ -15,7 +15,6 @@ envoy_package() envoy_cc_test( name = "envoy_quic_alarm_test", srcs = ["envoy_quic_alarm_test.cc"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ "//source/common/quic:envoy_quic_alarm_factory_lib", @@ -23,6 +22,7 @@ envoy_cc_test( "//source/common/quic:envoy_quic_clock_lib", "//test/test_common:simulated_time_system_lib", "//test/test_common:utility_lib", + "@com_github_google_quiche//:quic_platform", ], ) @@ -41,7 +41,6 @@ envoy_cc_test( envoy_cc_test( name = "envoy_quic_writer_test", srcs = ["envoy_quic_writer_test.cc"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ "//source/common/network:io_socket_error_lib", @@ -50,13 +49,13 @@ envoy_cc_test( "//test/mocks/api:api_mocks", "//test/mocks/network:network_mocks", "//test/test_common:threadsafe_singleton_injector_lib", + "@com_github_google_quiche//:quic_platform", ], ) envoy_cc_test( name = "envoy_quic_proof_source_test", srcs = ["envoy_quic_proof_source_test.cc"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ ":test_utils_lib", @@ -69,6 +68,7 @@ envoy_cc_test( "//test/mocks/ssl:ssl_mocks", "//test/test_common:test_runtime_lib", "@com_github_google_quiche//:quic_core_versions_lib", + "@com_github_google_quiche//:quic_platform", "@com_github_google_quiche//:quic_test_tools_test_certificates_lib", ], ) @@ -101,7 +101,6 @@ envoy_cc_test( envoy_cc_test( name = "envoy_quic_proof_verifier_test", srcs = ["envoy_quic_proof_verifier_test.cc"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ ":test_utils_lib", @@ -112,6 +111,7 @@ envoy_cc_test( "//test/mocks/event:event_mocks", "//test/mocks/server:server_factory_context_mocks", "//test/mocks/ssl:ssl_mocks", + "@com_github_google_quiche//:quic_platform", "@com_github_google_quiche//:quic_test_tools_test_certificates_lib", ], ) diff --git a/test/common/quic/platform/BUILD b/test/common/quic/platform/BUILD index ef8fc42c9864..dca484cd5032 100644 --- a/test/common/quic/platform/BUILD +++ b/test/common/quic/platform/BUILD @@ -23,7 +23,6 @@ envoy_cc_test( "//conditions:default": ["-Wno-unused-parameter"], }), data = ["//test/common/tls/test_data:certs"], - external_deps = ["quiche_quic_platform"], tags = ["nofips"], deps = [ "//source/common/memory:stats_lib", @@ -37,6 +36,7 @@ envoy_cc_test( "//test/test_common:utility_lib", "@com_github_google_quiche//:quic_core_error_codes_lib", "@com_github_google_quiche//:quic_core_types_lib", + "@com_github_google_quiche//:quic_platform", "@com_github_google_quiche//:quic_platform_expect_bug", "@com_github_google_quiche//:quic_platform_test", "@com_github_google_quiche//:quic_platform_test_output", diff --git a/test/common/router/BUILD b/test/common/router/BUILD index 414d769202cc..af12e529b7da 100644 --- a/test/common/router/BUILD +++ b/test/common/router/BUILD @@ -65,14 +65,12 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "config_impl_headermap_benchmark_test", srcs = ["config_impl_headermap_benchmark_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/http:header_map_lib", "//source/common/router:config_lib", "//test/mocks/server:server_mocks", "//test/test_common:utility_lib", + "@com_github_google_benchmark//:benchmark", "@envoy_api//envoy/config/route/v3:pkg_cc_proto", ], ) @@ -519,15 +517,13 @@ envoy_proto_library( envoy_cc_benchmark_binary( name = "config_impl_speed_test", srcs = ["config_impl_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/common:assert_lib", "//source/common/router:config_lib", "//test/mocks/server:instance_mocks", "//test/mocks/stream_info:stream_info_mocks", "//test/test_common:utility_lib", + "@com_github_google_benchmark//:benchmark", "@envoy_api//envoy/config/route/v3:pkg_cc_proto", ], ) @@ -540,12 +536,10 @@ envoy_benchmark_test( envoy_cc_benchmark_binary( name = "header_formatter_speed_test", srcs = ["header_formatter_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/router:router_lib", "//test/common/stream_info:test_util", + "@com_github_google_benchmark//:benchmark", ], ) diff --git a/test/common/stats/BUILD b/test/common/stats/BUILD index 95ccb0e0e079..7218abb28a53 100644 --- a/test/common/stats/BUILD +++ b/test/common/stats/BUILD @@ -72,14 +72,12 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "recent_lookups_benchmark", srcs = ["recent_lookups_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/common:random_generator_lib", "//source/common/common:utility_lib", "//source/common/runtime:runtime_lib", "//source/common/stats:recent_lookups_lib", + "@com_github_google_benchmark//:benchmark", ], ) @@ -215,9 +213,6 @@ envoy_cc_benchmark_binary( "make_elements_helper.cc", "symbol_table_speed_test.cc", ], - external_deps = [ - "benchmark", - ], deps = [ ":make_elements_helper_lib", ":stat_test_utility_lib", @@ -229,6 +224,7 @@ envoy_cc_benchmark_binary( "//test/mocks/stats:stats_mocks", "//test/test_common:logging_lib", "//test/test_common:utility_lib", + "@com_github_google_benchmark//:benchmark", "@com_google_absl//absl/strings", ], ) @@ -248,9 +244,6 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "deferred_creation_stats_benchmark", srcs = ["deferred_creation_stats_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ ":real_thread_test_base", "//source/common/common:random_generator_lib", @@ -260,6 +253,7 @@ envoy_cc_benchmark_binary( "//source/common/stats:isolated_store_lib", "//source/common/stats:symbol_table_lib", "//source/exe:process_wide_lib", + "@com_github_google_benchmark//:benchmark", ], ) @@ -279,15 +273,13 @@ envoy_cc_benchmark_binary( srcs = [ "stats_matcher_impl_speed_test.cc", ], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/memory:stats_lib", "//source/common/stats:stats_matcher_lib", "//test/mocks/server:server_factory_context_mocks", "//test/test_common:logging_lib", "//test/test_common:utility_lib", + "@com_github_google_benchmark//:benchmark", "@com_google_absl//absl/strings", "@envoy_api//envoy/config/metrics/v3:pkg_cc_proto", "@envoy_api//envoy/type/matcher/v3:pkg_cc_proto", @@ -325,11 +317,9 @@ envoy_cc_benchmark_binary( srcs = [ "tag_extractor_impl_speed_test.cc", ], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/stats:tag_producer_lib", + "@com_github_google_benchmark//:benchmark", "@envoy_api//envoy/config/metrics/v3:pkg_cc_proto", ], ) @@ -366,9 +356,6 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "thread_local_store_speed_test", srcs = ["thread_local_store_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ ":stat_test_utility_lib", "//source/common/common:thread_lib", @@ -380,6 +367,7 @@ envoy_cc_benchmark_binary( "//test/test_common:simulated_time_system_lib", "//test/test_common:test_time_lib", "//test/test_common:utility_lib", + "@com_github_google_benchmark//:benchmark", "@com_google_absl//absl/strings", "@envoy_api//envoy/config/metrics/v3:pkg_cc_proto", ], diff --git a/test/common/tls/BUILD b/test/common/tls/BUILD index 055c56ab68b1..6e2dc3207d6a 100644 --- a/test/common/tls/BUILD +++ b/test/common/tls/BUILD @@ -282,14 +282,12 @@ envoy_cc_benchmark_binary( data = [ "//test/common/tls/test_data:certs", ], - external_deps = [ - "benchmark", - "ssl", - ], + external_deps = ["ssl"], # Uses raw POSIX syscalls, does not build on Windows. tags = ["skip_on_windows"], deps = [ "//source/common/buffer:buffer_lib", + "@com_github_google_benchmark//:benchmark", ], ) diff --git a/test/common/upstream/BUILD b/test/common/upstream/BUILD index 97fdd20407ba..216aca1bacc3 100644 --- a/test/common/upstream/BUILD +++ b/test/common/upstream/BUILD @@ -604,12 +604,10 @@ envoy_cc_fuzz_test( envoy_cc_benchmark_binary( name = "scheduler_benchmark", srcs = ["scheduler_benchmark.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/common:random_generator_lib", "//source/common/upstream:scheduler_lib", + "@com_github_google_benchmark//:benchmark", ], ) diff --git a/test/dependencies/BUILD b/test/dependencies/BUILD index 1ef365b90fc2..688fedc33180 100644 --- a/test/dependencies/BUILD +++ b/test/dependencies/BUILD @@ -11,7 +11,5 @@ envoy_package() envoy_cc_test( name = "curl_test", srcs = ["curl_test.cc"], - external_deps = [ - "curl", - ], + external_deps = ["curl"], ) diff --git a/test/extensions/access_loggers/fluentd/BUILD b/test/extensions/access_loggers/fluentd/BUILD index 0c6e832be614..a8a4d9acad8e 100644 --- a/test/extensions/access_loggers/fluentd/BUILD +++ b/test/extensions/access_loggers/fluentd/BUILD @@ -15,14 +15,12 @@ envoy_extension_cc_test( name = "fluentd_access_log_impl_test", srcs = ["fluentd_access_log_impl_test.cc"], extension_names = ["envoy.access_loggers.fluentd"], - external_deps = [ - "msgpack", - ], deps = [ "//source/extensions/access_loggers/fluentd:config", "//test/mocks/server:factory_context_mocks", "//test/test_common:environment_lib", "//test/test_common:utility_lib", + "@com_github_msgpack_cpp//:msgpack", "@envoy_api//envoy/config/accesslog/v3:pkg_cc_proto", "@envoy_api//envoy/extensions/access_loggers/fluentd/v3:pkg_cc_proto", ], diff --git a/test/extensions/access_loggers/open_telemetry/BUILD b/test/extensions/access_loggers/open_telemetry/BUILD index f569984ae4ea..0e7ddef73ede 100644 --- a/test/extensions/access_loggers/open_telemetry/BUILD +++ b/test/extensions/access_loggers/open_telemetry/BUILD @@ -130,9 +130,6 @@ envoy_extension_cc_test( envoy_cc_benchmark_binary( name = "substitution_formatter_speed_test", srcs = ["substitution_formatter_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/formatter:formatter_extension_lib", "//source/common/http:header_map_lib", @@ -140,6 +137,7 @@ envoy_cc_benchmark_binary( "//source/extensions/access_loggers/open_telemetry:substitution_formatter_lib", "//test/common/stream_info:test_util", "//test/mocks/stream_info:stream_info_mocks", + "@com_github_google_benchmark//:benchmark", "@opentelemetry_proto//:common_cc_proto", ], ) diff --git a/test/extensions/bootstrap/wasm/BUILD b/test/extensions/bootstrap/wasm/BUILD index fd54284031f1..5efd44307b04 100644 --- a/test/extensions/bootstrap/wasm/BUILD +++ b/test/extensions/bootstrap/wasm/BUILD @@ -97,9 +97,6 @@ envoy_extension_cc_test_binary( "//test/extensions/bootstrap/wasm/test_data:speed_cpp.wasm", ]), extension_names = ["envoy.bootstrap.wasm"], - external_deps = [ - "benchmark", - ], tags = ["skip_on_windows"], deps = [ "//source/common/event:dispatcher_lib", @@ -113,6 +110,7 @@ envoy_extension_cc_test_binary( "//test/mocks/upstream:upstream_mocks", "//test/test_common:environment_lib", "//test/test_common:simulated_time_system_lib", + "@com_github_google_benchmark//:benchmark", "@com_google_absl//absl/types:optional", ], ) diff --git a/test/extensions/clusters/eds/BUILD b/test/extensions/clusters/eds/BUILD index 09e0f5909326..90d28739590f 100644 --- a/test/extensions/clusters/eds/BUILD +++ b/test/extensions/clusters/eds/BUILD @@ -45,9 +45,6 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "eds_speed_test", srcs = ["eds_speed_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//envoy/config:xds_resources_delegate_interface", "//source/common/config:protobuf_link_hacks", @@ -69,6 +66,7 @@ envoy_cc_benchmark_binary( "//test/mocks/upstream:cluster_manager_mocks", "//test/test_common:test_runtime_lib", "//test/test_common:utility_lib", + "@com_github_google_benchmark//:benchmark", "@envoy_api//envoy/config/cluster/v3:pkg_cc_proto", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", "@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto", diff --git a/test/extensions/common/wasm/BUILD b/test/extensions/common/wasm/BUILD index f46b84d59e41..7d0cf2c213b7 100644 --- a/test/extensions/common/wasm/BUILD +++ b/test/extensions/common/wasm/BUILD @@ -75,9 +75,6 @@ envoy_cc_test( envoy_cc_test_binary( name = "wasm_speed_test", srcs = ["wasm_speed_test.cc"], - external_deps = [ - "benchmark", - ], tags = ["skip_on_windows"], deps = [ "//source/common/event:dispatcher_lib", @@ -86,6 +83,7 @@ envoy_cc_test_binary( "//test/mocks/server:server_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:environment_lib", + "@com_github_google_benchmark//:benchmark", "@com_google_absl//absl/types:optional", ], ) diff --git a/test/extensions/filters/http/compressor/BUILD b/test/extensions/filters/http/compressor/BUILD index 58530912582d..001aaa5d9cac 100644 --- a/test/extensions/filters/http/compressor/BUILD +++ b/test/extensions/filters/http/compressor/BUILD @@ -73,10 +73,6 @@ envoy_extension_cc_test( envoy_cc_benchmark_binary( name = "compressor_filter_speed_test", srcs = ["compressor_filter_speed_test.cc"], - external_deps = [ - "benchmark", - "googletest", - ], deps = [ "//envoy/compression/compressor:compressor_factory_interface", "//source/common/protobuf:utility_lib", @@ -91,6 +87,8 @@ envoy_cc_benchmark_binary( "//test/mocks/runtime:runtime_mocks", "//test/test_common:printers_lib", "//test/test_common:utility_lib", + "@com_github_google_benchmark//:benchmark", + "@com_google_googletest//:gtest", "@envoy_api//envoy/extensions/filters/http/compressor/v3:pkg_cc_proto", ], ) diff --git a/test/extensions/filters/http/ext_proc/BUILD b/test/extensions/filters/http/ext_proc/BUILD index 9d144ccd7c7a..b2dcff8c17cd 100644 --- a/test/extensions/filters/http/ext_proc/BUILD +++ b/test/extensions/filters/http/ext_proc/BUILD @@ -377,8 +377,6 @@ envoy_extension_cc_test_library( name = "tracer_test_filter_lib", srcs = ["tracer_test_filter.cc"], extension_names = ["envoy.filters.http.ext_proc"], - external_deps = [ - ], deps = [ ":tracer_test_filter_proto_cc_proto", "//source/common/config:utility_lib", diff --git a/test/extensions/filters/http/grpc_field_extraction/message_converter/BUILD b/test/extensions/filters/http/grpc_field_extraction/message_converter/BUILD index 67f4ecae2eb1..a26bf073a023 100644 --- a/test/extensions/filters/http/grpc_field_extraction/message_converter/BUILD +++ b/test/extensions/filters/http/grpc_field_extraction/message_converter/BUILD @@ -12,8 +12,6 @@ envoy_package() envoy_cc_test_library( name = "message_converter_test_lib", hdrs = ["message_converter_test_lib.h"], - external_deps = [ - ], deps = [ "//source/common/buffer:buffer_lib", "//source/common/grpc:codec_lib", diff --git a/test/extensions/filters/http/proto_message_extraction/extraction_util/BUILD b/test/extensions/filters/http/proto_message_extraction/extraction_util/BUILD index e6b9a2049391..3d933ebb9da0 100644 --- a/test/extensions/filters/http/proto_message_extraction/extraction_util/BUILD +++ b/test/extensions/filters/http/proto_message_extraction/extraction_util/BUILD @@ -23,7 +23,6 @@ envoy_cc_test( "@com_google_absl//absl/log:check", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", - "@com_google_googletest//:gtest", "@com_google_protobuf//:protobuf", "@com_google_protoconverter//:all", "@com_google_protofieldextraction//:all_libs", diff --git a/test/extensions/filters/listener/tls_inspector/BUILD b/test/extensions/filters/listener/tls_inspector/BUILD index a843e2a574f6..410d6f9a58d3 100644 --- a/test/extensions/filters/listener/tls_inspector/BUILD +++ b/test/extensions/filters/listener/tls_inspector/BUILD @@ -58,9 +58,6 @@ envoy_extension_cc_benchmark_binary( name = "tls_inspector_benchmark", srcs = ["tls_inspector_benchmark.cc"], extension_names = ["envoy.filters.listener.tls_inspector"], - external_deps = [ - "benchmark", - ], deps = [ ":tls_utility_lib", "//source/common/http:utility_lib", @@ -71,6 +68,7 @@ envoy_extension_cc_benchmark_binary( "//test/mocks/network:network_mocks", "//test/mocks/stats:stats_mocks", "//test/test_common:threadsafe_singleton_injector_lib", + "@com_github_google_benchmark//:benchmark", ], ) diff --git a/test/extensions/filters/network/redis_proxy/BUILD b/test/extensions/filters/network/redis_proxy/BUILD index 32c3bd39ed90..4b8282b6a34d 100644 --- a/test/extensions/filters/network/redis_proxy/BUILD +++ b/test/extensions/filters/network/redis_proxy/BUILD @@ -136,9 +136,6 @@ envoy_extension_cc_benchmark_binary( name = "command_lookup_speed_test", srcs = ["command_lookup_speed_test.cc"], extension_names = ["envoy.filters.network.redis_proxy"], - external_deps = [ - "benchmark", - ], deps = [ ":redis_mocks", "//source/common/stats:isolated_store_lib", @@ -148,6 +145,7 @@ envoy_extension_cc_benchmark_binary( "//test/mocks/network:network_mocks", "//test/test_common:printers_lib", "//test/test_common:simulated_time_system_lib", + "@com_github_google_benchmark//:benchmark", ], ) @@ -193,9 +191,6 @@ envoy_extension_cc_benchmark_binary( name = "command_split_speed_test", srcs = ["command_split_speed_test.cc"], extension_names = ["envoy.filters.network.redis_proxy"], - external_deps = [ - "benchmark", - ], deps = [ ":redis_mocks", "//source/common/stats:isolated_store_lib", @@ -204,6 +199,7 @@ envoy_extension_cc_benchmark_binary( "//source/extensions/filters/network/redis_proxy:router_lib", "//test/test_common:printers_lib", "//test/test_common:simulated_time_system_lib", + "@com_github_google_benchmark//:benchmark", ], ) diff --git a/test/extensions/filters/udp/dns_filter/BUILD b/test/extensions/filters/udp/dns_filter/BUILD index 38b051cc6d7f..61b358d9b3fe 100644 --- a/test/extensions/filters/udp/dns_filter/BUILD +++ b/test/extensions/filters/udp/dns_filter/BUILD @@ -18,8 +18,8 @@ envoy_extension_cc_test_library( srcs = ["dns_filter_test_utils.cc"], hdrs = ["dns_filter_test_utils.h"], extension_names = ["envoy.filters.udp.dns_filter"], - external_deps = ["ares"], deps = [ + "//bazel/foreign_cc:ares", "//source/common/common:random_generator_lib", "//source/common/network:address_lib", "//source/common/network:utility_lib", diff --git a/test/extensions/load_balancing_policies/common/BUILD b/test/extensions/load_balancing_policies/common/BUILD index 48678bf4f7a8..2fa854c692aa 100644 --- a/test/extensions/load_balancing_policies/common/BUILD +++ b/test/extensions/load_balancing_policies/common/BUILD @@ -14,9 +14,6 @@ envoy_cc_test_library( name = "benchmark_base_tester_lib", srcs = ["benchmark_base_tester.cc"], hdrs = ["benchmark_base_tester.h"], - external_deps = [ - "benchmark", - ], deps = [ "//source/common/common:random_generator_lib", "//source/common/memory:stats_lib", @@ -25,6 +22,7 @@ envoy_cc_test_library( "//test/mocks/upstream:cluster_info_mocks", "//test/test_common:printers_lib", "//test/test_common:simulated_time_system_lib", + "@com_github_google_benchmark//:benchmark", "@envoy_api//envoy/config/cluster/v3:pkg_cc_proto", ], ) diff --git a/test/extensions/load_balancing_policies/subset/BUILD b/test/extensions/load_balancing_policies/subset/BUILD index 689deaaf9d21..b66dab816188 100644 --- a/test/extensions/load_balancing_policies/subset/BUILD +++ b/test/extensions/load_balancing_policies/subset/BUILD @@ -81,14 +81,12 @@ envoy_extension_cc_benchmark_binary( name = "subset_benchmark", srcs = ["subset_benchmark.cc"], extension_names = ["envoy.load_balancing_policies.subset"], - external_deps = [ - "benchmark", - ], deps = [ "//source/extensions/load_balancing_policies/random:config", "//source/extensions/load_balancing_policies/subset:config", "//test/extensions/load_balancing_policies/common:benchmark_base_tester_lib", "//test/mocks/upstream:load_balancer_mocks", + "@com_github_google_benchmark//:benchmark", "@envoy_api//envoy/config/cluster/v3:pkg_cc_proto", "@envoy_api//envoy/extensions/load_balancing_policies/random/v3:pkg_cc_proto", "@envoy_api//envoy/extensions/load_balancing_policies/subset/v3:pkg_cc_proto", diff --git a/test/extensions/tracers/datadog/BUILD b/test/extensions/tracers/datadog/BUILD index 4eba5b353436..739bfd76ec98 100644 --- a/test/extensions/tracers/datadog/BUILD +++ b/test/extensions/tracers/datadog/BUILD @@ -31,9 +31,6 @@ envoy_extension_cc_test( "-DDD_USE_ABSEIL_FOR_ENVOY", ], extension_names = ["envoy.tracers.datadog"], - external_deps = [ - "dd_trace_cpp", - ], # TODO(wrowe): envoy_extension_ rules don't currently exclude windows extensions tags = ["skip_on_windows"], deps = [ @@ -56,6 +53,7 @@ envoy_extension_cc_test( "//test/mocks/upstream:cluster_manager_mocks", "//test/mocks/upstream:thread_local_cluster_mocks", "//test/test_common:utility_lib", + "@com_github_datadog_dd_trace_cpp//:dd_trace_cpp", "@envoy_api//envoy/config/trace/v3:pkg_cc_proto", ], ) diff --git a/test/extensions/tracers/opentelemetry/BUILD b/test/extensions/tracers/opentelemetry/BUILD index 8aa5bb003b7a..ac25ecbdb997 100644 --- a/test/extensions/tracers/opentelemetry/BUILD +++ b/test/extensions/tracers/opentelemetry/BUILD @@ -22,9 +22,6 @@ envoy_extension_cc_test( "-DHAVE_ABSEIL", ], extension_names = ["envoy.tracers.opentelemetry"], - external_deps = [ - "opentelemetry_api", - ], deps = [ "//envoy/common:time_interface", "//envoy/runtime:runtime_interface", @@ -49,6 +46,7 @@ envoy_extension_cc_test( "//test/test_common:simulated_time_system_lib", "//test/test_common:utility_lib", "@com_google_absl//absl/types:optional", + "@io_opentelemetry_cpp//api", ], ) diff --git a/test/extensions/tracers/skywalking/BUILD b/test/extensions/tracers/skywalking/BUILD index 36f31a7bcea0..e0e017783f2d 100644 --- a/test/extensions/tracers/skywalking/BUILD +++ b/test/extensions/tracers/skywalking/BUILD @@ -50,14 +50,12 @@ envoy_cc_library( envoy_extension_cc_test( name = "skywalking_test_helper", extension_names = ["envoy.tracers.skywalking"], - external_deps = [ - "cpp2sky", - ], deps = [ ":skywalking_test_helper_lib", "//source/common/common:base64_lib", "//source/common/common:hex_lib", "//test/test_common:utility_lib", + "@com_github_skyapm_cpp2sky//source:cpp2sky_data_lib", ], ) diff --git a/test/extensions/transport_sockets/alts/BUILD b/test/extensions/transport_sockets/alts/BUILD index d36c65499448..87a978204420 100644 --- a/test/extensions/transport_sockets/alts/BUILD +++ b/test/extensions/transport_sockets/alts/BUILD @@ -117,9 +117,7 @@ envoy_extension_cc_test( name = "tsi_socket_test", srcs = ["tsi_socket_test.cc"], extension_names = ["envoy.transport_sockets.alts"], - external_deps = [ - "grpc", - ], + external_deps = ["grpc"], deps = [ "//envoy/event:dispatcher_interface", "//envoy/network:address_interface", @@ -149,9 +147,7 @@ envoy_extension_cc_test( size = "large", srcs = envoy_select_google_grpc(["alts_integration_test.cc"]), extension_names = ["envoy.transport_sockets.alts"], - external_deps = [ - "grpc", - ], + external_deps = ["grpc"], deps = [ "//source/common/common:utility_lib", "//source/common/event:dispatcher_includes", diff --git a/test/fuzz/BUILD b/test/fuzz/BUILD index 4de7a506c76b..d9dd74d00302 100644 --- a/test/fuzz/BUILD +++ b/test/fuzz/BUILD @@ -59,9 +59,6 @@ envoy_cc_test_library( name = "utility_lib", srcs = ["utility.cc"], hdrs = ["utility.h"], - external_deps = [ - "quiche_http2_adapter", - ], deps = [ ":common_proto_cc_proto", "//source/common/common:empty_string", @@ -72,6 +69,7 @@ envoy_cc_test_library( "//test/mocks/ssl:ssl_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:utility_lib", + "@com_github_google_quiche//:http2_adapter", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", ], ) diff --git a/test/server/BUILD b/test/server/BUILD index 3aea3d95c1fa..f984efcd487c 100644 --- a/test/server/BUILD +++ b/test/server/BUILD @@ -406,15 +406,13 @@ envoy_cc_test( envoy_cc_benchmark_binary( name = "server_stats_flush_benchmark", srcs = ["server_stats_flush_benchmark_test.cc"], - external_deps = [ - "benchmark", - ], deps = [ "//envoy/stats:stats_interface", "//source/common/stats:thread_local_store_lib", "//source/server:server_lib", "//test/mocks/upstream:cluster_manager_mocks", "//test/test_common:simulated_time_system_lib", + "@com_github_google_benchmark//:benchmark", ], ) diff --git a/test/test_common/BUILD b/test/test_common/BUILD index f218ddd5103e..4cc616a43000 100644 --- a/test/test_common/BUILD +++ b/test/test_common/BUILD @@ -17,9 +17,7 @@ envoy_cc_test_library( name = "environment_lib", srcs = ["environment.cc"], hdrs = ["environment.h"], - external_deps = [ - "bazel_runfiles", - ], + external_deps = ["bazel_runfiles"], deps = [ ":network_utility_lib", "//envoy/server:options_interface", diff --git a/test/tools/router_check/BUILD b/test/tools/router_check/BUILD index 01baa3acb932..b09a660e6de0 100644 --- a/test/tools/router_check/BUILD +++ b/test/tools/router_check/BUILD @@ -36,7 +36,6 @@ envoy_cc_test_library( "router.h", ], copts = ["-DHAVE_LONG_LONG"], - external_deps = ["tclap"], deps = [ ":validation_proto_cc_proto", "//source/common/common:random_generator_lib", @@ -54,6 +53,7 @@ envoy_cc_test_library( "//test/test_common:printers_lib", "//test/test_common:test_runtime_lib", "//test/test_common:utility_lib", + "@com_github_mirror_tclap//:tclap", "@envoy_api//envoy/config/core/v3:pkg_cc_proto", "@envoy_api//envoy/config/route/v3:pkg_cc_proto", "@envoy_api//envoy/type/v3:pkg_cc_proto", diff --git a/test/tools/schema_validator/BUILD b/test/tools/schema_validator/BUILD index 4ea42313bd22..ed852bdd0b9e 100644 --- a/test/tools/schema_validator/BUILD +++ b/test/tools/schema_validator/BUILD @@ -27,13 +27,13 @@ envoy_cc_test_library( hdrs = ["validator.h"], # TCLAP command line parser needs this to support int64_t/uint64_t in several build environments. copts = ["-DHAVE_LONG_LONG"], - external_deps = ["tclap"], deps = [ "//envoy/api:api_interface", "//source/common/protobuf:utility_lib", "//source/common/stats:isolated_store_lib", "//source/common/version:version_lib", "//test/test_common:utility_lib", + "@com_github_mirror_tclap//:tclap", "@envoy_api//envoy/config/bootstrap/v3:pkg_cc_proto", "@envoy_api//envoy/config/route/v3:pkg_cc_proto", "@envoy_api//envoy/extensions/filters/network/http_connection_manager/v3:pkg_cc_proto", diff --git a/test/tools/wee8_compile/BUILD b/test/tools/wee8_compile/BUILD index 1cad66e548ad..98a77602bf85 100644 --- a/test/tools/wee8_compile/BUILD +++ b/test/tools/wee8_compile/BUILD @@ -23,5 +23,7 @@ envoy_cc_library( "-Wno-non-virtual-dtor", "-Wno-unused-parameter", ], - external_deps = ["wee8"], + deps = [ + "@v8//:wee8", + ], )