Skip to content

Commit

Permalink
Remove most binds for abseil and migrate abseil external_deps to deps…
Browse files Browse the repository at this point in the history
… (#36171)

Remove most binds for abseil and migrate abseil external_deps to deps.

Risk Level: low
Testing: existing test pass

---------

Signed-off-by: Alejandro R Sedeño <asedeno@google.com>
  • Loading branch information
asedeno committed Sep 17, 2024
1 parent 748e7d7 commit 7155714
Show file tree
Hide file tree
Showing 107 changed files with 284 additions and 476 deletions.
18 changes: 5 additions & 13 deletions bazel/external/quiche.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,6 @@ envoy_cc_library(
"quiche/http2/adapter/oghttp2_session.h",
],
copts = quiche_copts,
external_deps = [
"abseil_algorithm",
],
repository = "@envoy",
deps = [
":http2_adapter_chunked_buffer",
Expand All @@ -457,6 +454,7 @@ envoy_cc_library(
":http2_no_op_headers_handler_lib",
":quiche_common_callbacks",
":spdy_core_http2_header_block_lib",
"@com_google_absl//absl/algorithm",
"@com_google_absl//absl/cleanup",
],
)
Expand Down Expand Up @@ -2296,13 +2294,11 @@ envoy_quic_cc_library(
hdrs = [
"quiche/quic/core/quic_connection_context.h",
],
external_deps = [
"abseil_str_format",
],
deps = [
":quic_platform_export",
":quiche_common_platform",
":quiche_common_text_utils_lib",
"@com_google_absl//absl/strings:str_format",
],
)

Expand Down Expand Up @@ -2664,7 +2660,6 @@ envoy_quic_cc_library(
hdrs = ["quiche/quic/core/crypto/proof_source_x509.h"],
external_deps = [
"ssl",
"abseil_node_hash_map",
],
deps = [
":quic_core_crypto_certificate_view_lib",
Expand All @@ -2675,6 +2670,7 @@ envoy_quic_cc_library(
":quic_platform_base",
":quiche_common_endian_lib",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:node_hash_map",
],
)

Expand Down Expand Up @@ -5091,13 +5087,11 @@ envoy_cc_test(
envoy_cc_library(
name = "quiche_common_print_elements_lib",
hdrs = ["quiche/common/print_elements.h"],
external_deps = [
"abseil_inlined_vector",
],
repository = "@envoy",
tags = ["nofips"],
deps = [
":quiche_common_platform_export",
"@com_google_absl//absl/container:inlined_vector",
],
)

Expand All @@ -5123,14 +5117,12 @@ envoy_cc_library(
name = "quiche_common_text_utils_lib",
srcs = ["quiche/common/quiche_text_utils.cc"],
hdrs = ["quiche/common/quiche_text_utils.h"],
external_deps = [
"abseil_str_format",
],
repository = "@envoy",
tags = ["nofips"],
deps = [
":quiche_common_platform_export",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/strings:str_format",
],
)

Expand Down
96 changes: 1 addition & 95 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -696,24 +696,8 @@ def _com_google_absl():
patches = ["@envoy//bazel:abseil.patch"],
patch_args = ["-p1"],
)
native.bind(
name = "abseil_any",
actual = "@com_google_absl//absl/types:any",
)
native.bind(
name = "abseil_base",
actual = "@com_google_absl//absl/base:base",
)

# Bind for grpc.
native.bind(
name = "absl-base",
actual = "@com_google_absl//absl/base",
)
native.bind(
name = "abseil_btree",
actual = "@com_google_absl//absl/container:btree",
)
# keep these until jwt_verify_lib is updated.
native.bind(
name = "abseil_flat_hash_map",
actual = "@com_google_absl//absl/container:flat_hash_map",
Expand All @@ -722,93 +706,15 @@ def _com_google_absl():
name = "abseil_flat_hash_set",
actual = "@com_google_absl//absl/container:flat_hash_set",
)
native.bind(
name = "abseil_hash",
actual = "@com_google_absl//absl/hash:hash",
)
native.bind(
name = "abseil_hash_testing",
actual = "@com_google_absl//absl/hash:hash_testing",
)
native.bind(
name = "abseil_inlined_vector",
actual = "@com_google_absl//absl/container:inlined_vector",
)
native.bind(
name = "abseil_memory",
actual = "@com_google_absl//absl/memory:memory",
)
native.bind(
name = "abseil_node_hash_map",
actual = "@com_google_absl//absl/container:node_hash_map",
)
native.bind(
name = "abseil_node_hash_set",
actual = "@com_google_absl//absl/container:node_hash_set",
)
native.bind(
name = "abseil_str_format",
actual = "@com_google_absl//absl/strings:str_format",
)
native.bind(
name = "abseil_strings",
actual = "@com_google_absl//absl/strings:strings",
)
native.bind(
name = "abseil_int128",
actual = "@com_google_absl//absl/numeric:int128",
)
native.bind(
name = "abseil_optional",
actual = "@com_google_absl//absl/types:optional",
)
native.bind(
name = "abseil_synchronization",
actual = "@com_google_absl//absl/synchronization:synchronization",
)
native.bind(
name = "abseil_symbolize",
actual = "@com_google_absl//absl/debugging:symbolize",
)
native.bind(
name = "abseil_stacktrace",
actual = "@com_google_absl//absl/debugging:stacktrace",
)
native.bind(
name = "abseil_statusor",
actual = "@com_google_absl//absl/status:statusor",
)

# Require abseil_time as an indirect dependency as it is needed by the
# direct dependency jwt_verify_lib.
native.bind(
name = "abseil_time",
actual = "@com_google_absl//absl/time:time",
)

# Bind for grpc.
native.bind(
name = "absl-time",
actual = "@com_google_absl//absl/time:time",
)

native.bind(
name = "abseil_algorithm",
actual = "@com_google_absl//absl/algorithm:algorithm",
)
native.bind(
name = "abseil_variant",
actual = "@com_google_absl//absl/types:variant",
)
native.bind(
name = "abseil_status",
actual = "@com_google_absl//absl/status",
)
native.bind(
name = "abseil_cleanup",
actual = "@com_google_absl//absl/cleanup:cleanup",
)

def _com_google_protobuf():
external_http_archive(
name = "rules_python",
Expand Down
2 changes: 1 addition & 1 deletion contrib/config/source/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ envoy_cc_contrib_extension(
name = "kv_store_xds_delegate",
srcs = ["kv_store_xds_delegate.cc"],
hdrs = ["kv_store_xds_delegate.h"],
external_deps = ["abseil_optional"],
deps = [
"//envoy/common:key_value_store_interface",
"//envoy/common:time_interface",
Expand All @@ -21,6 +20,7 @@ envoy_cc_contrib_extension(
"//envoy/stats:stats_macros",
"//source/common/config:utility_lib",
"//source/common/protobuf:utility_lib",
"@com_google_absl//absl/types:optional",
"@envoy_api//contrib/envoy/extensions/config/v3alpha:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
Expand Down
2 changes: 1 addition & 1 deletion contrib/kafka/filters/network/source/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ envoy_cc_library(
hdrs = [
"kafka_types.h",
],
external_deps = ["abseil_optional"],
deps = [
"//source/common/common:macros",
"@com_google_absl//absl/types:optional",
],
)
2 changes: 1 addition & 1 deletion contrib/rocketmq_proxy/filters/network/source/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ envoy_cc_contrib_extension(
envoy_cc_library(
name = "metadata_lib",
hdrs = ["metadata.h"],
external_deps = ["abseil_optional"],
deps = [
"//source/common/http:header_map_lib",
"@com_google_absl//absl/types:optional",
],
)
6 changes: 3 additions & 3 deletions contrib/sip_proxy/filters/network/source/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ envoy_cc_library(
name = "conn_manager_lib",
srcs = ["conn_manager.cc"],
hdrs = ["conn_manager.h"],
external_deps = ["abseil_any"],
deps = [
":app_exception_lib",
":decoder_lib",
Expand All @@ -67,6 +66,7 @@ envoy_cc_library(
"//source/common/stats:timespan_lib",
"//source/common/stream_info:stream_info_lib",
"//source/common/tracing:http_tracer_lib",
"@com_google_absl//absl/types:any",
],
)

Expand Down Expand Up @@ -112,12 +112,12 @@ envoy_cc_library(
"metadata.h",
"operation.h",
],
external_deps = ["abseil_optional"],
deps = [
":sip_lib",
"//envoy/buffer:buffer_interface",
"//source/common/common:macros",
"//source/common/http:header_map_lib",
"@com_google_absl//absl/types:optional",
"@envoy_api//contrib/envoy/extensions/filters/network/sip_proxy/v3alpha:pkg_cc_proto",
],
)
Expand All @@ -138,7 +138,6 @@ envoy_cc_library(
hdrs = [
"utility.h",
],
external_deps = ["abseil_optional"],
deps = [
":decoder_events_lib",
":metadata_lib",
Expand All @@ -150,6 +149,7 @@ envoy_cc_library(
"//source/common/config:utility_lib",
"//source/common/protobuf",
"//source/common/singleton:const_singleton",
"@com_google_absl//absl/types:optional",
"@envoy_api//contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha:pkg_cc_proto",
"@envoy_api//contrib/envoy/extensions/filters/network/sip_proxy/v3alpha:pkg_cc_proto",
],
Expand Down
2 changes: 1 addition & 1 deletion contrib/sip_proxy/filters/network/source/router/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ envoy_cc_contrib_extension(
envoy_cc_library(
name = "router_interface",
hdrs = ["router.h"],
external_deps = ["abseil_optional"],
deps = [
"//contrib/sip_proxy/filters/network/source:metadata_lib",
"//envoy/router:router_interface",
"@com_google_absl//absl/types:optional",
],
)

Expand Down
6 changes: 2 additions & 4 deletions contrib/sip_proxy/filters/network/source/tra/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ envoy_cc_contrib_extension(
envoy_cc_library(
name = "tra_client_interface",
hdrs = ["tra.h"],
external_deps = [
"abseil_optional",
"abseil_any",
],
deps = [
"//envoy/singleton:manager_interface",
"//envoy/tracing:tracer_interface",
"//source/common/stats:symbol_table_lib",
"@com_google_absl//absl/types:any",
"@com_google_absl//absl/types:optional",
],
)
2 changes: 1 addition & 1 deletion envoy/api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ envoy_cc_library(
"os_sys_calls_hot_restart.h",
"os_sys_calls_linux.h",
],
external_deps = ["abseil_optional"],
deps = [
"//envoy/network:address_interface",
"@com_google_absl//absl/types:optional",
],
)
4 changes: 1 addition & 3 deletions envoy/buffer/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ envoy_package()
envoy_cc_library(
name = "buffer_interface",
hdrs = ["buffer.h"],
external_deps = [
"abseil_inlined_vector",
],
deps = [
"//envoy/api:os_sys_calls_interface",
"//envoy/common:exception_lib",
"//envoy/http:stream_reset_handler_interface",
"//source/common/common:assert_lib",
"//source/common/common:byte_order_lib",
"//source/common/common:utility_lib",
"@com_google_absl//absl/container:inlined_vector",
],
)
10 changes: 4 additions & 6 deletions envoy/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ envoy_basic_cc_library(
hdrs = [
"platform.h",
],
external_deps = ["abseil_strings"],
deps = ["@com_google_absl//absl/strings"],
)

envoy_basic_cc_library(
Expand All @@ -39,7 +39,7 @@ envoy_basic_cc_library(
hdrs = [
"optref.h",
],
external_deps = ["abseil_optional"],
deps = ["@com_google_absl//absl/types:optional"],
)

envoy_cc_library(
Expand Down Expand Up @@ -146,12 +146,10 @@ envoy_cc_library(
hdrs = [
"union_string.h",
],
external_deps = [
"abseil_inlined_vector",
"abseil_variant",
],
deps = [
"//source/common/common:assert_lib",
"//source/common/common:utility_lib",
"@com_google_absl//absl/container:inlined_vector",
"@com_google_absl//absl/types:variant",
],
)
4 changes: 2 additions & 2 deletions envoy/config/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ envoy_package()
envoy_cc_library(
name = "config_provider_interface",
hdrs = ["config_provider.h"],
external_deps = ["abseil_optional"],
deps = [
"//envoy/common:time_interface",
"//source/common/common:assert_lib",
"//source/common/protobuf",
"@com_google_absl//absl/types:optional",
],
)

Expand Down Expand Up @@ -125,12 +125,12 @@ envoy_cc_library(
envoy_cc_library(
name = "xds_resources_delegate_interface",
hdrs = ["xds_resources_delegate.h"],
external_deps = ["abseil_optional"],
deps = [
":subscription_interface",
":typed_config_interface",
"//envoy/api:api_interface",
"//envoy/protobuf:message_validator_interface",
"@com_google_absl//absl/types:optional",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
)
Expand Down
Loading

0 comments on commit 7155714

Please sign in to comment.