Skip to content

Commit

Permalink
[event-engine] Separate promise context from default event engine hea…
Browse files Browse the repository at this point in the history
…ders (#36148)

These two things are different (event engine being a context has nothing to do with the ability to get a default event engine).

Lumping them into the same header means that things that want the context also need to want the default event engine declarations, which in turn pull in CoreConfiguration -- which ultimately means that nothing that is depended on by CoreConfiguration can consume the event engine context, which is undesirable (and causing dependency loops in current work).

Also includes an impressive number of cleanups to `grpc_base` because I ran `fix_build_deps` on that target as part of this.

Closes #36148

COPYBARA_INTEGRATE_REVIEW=#36148 from ctiller:context-isnt-default--default-isnt-context a4fdad9
PiperOrigin-RevId: 617961015
  • Loading branch information
ctiller authored and Copybara-Service committed Mar 21, 2024
1 parent 4cf87d4 commit 21b5410
Show file tree
Hide file tree
Showing 19 changed files with 83 additions and 76 deletions.
48 changes: 1 addition & 47 deletions BUILD
Expand Up @@ -1962,20 +1962,15 @@ grpc_cc_library(
}),
external_deps = [
"absl/base:core_headers",
"absl/cleanup",
"absl/container:flat_hash_map",
"absl/container:flat_hash_set",
"absl/container:inlined_vector",
"absl/functional:any_invocable",
"absl/functional:function_ref",
"absl/hash",
"absl/meta:type_traits",
"absl/random",
"absl/status",
"absl/status:statusor",
"absl/strings",
"absl/strings:str_format",
"absl/time",
"absl/types:optional",
"absl/utility",
"madler_zlib",
Expand All @@ -1989,7 +1984,6 @@ grpc_cc_library(
visibility = ["@grpc:alt_grpc_base_legacy"],
deps = [
"api_trace",
"byte_buffer",
"call_combiner",
"call_trace",
"call_tracer",
Expand All @@ -1998,43 +1992,31 @@ grpc_cc_library(
"channel_stack_builder",
"channelz",
"config",
"config_vars",
"cpp_impl_of",
"debug_location",
"dynamic_annotations",
"exec_ctx",
"gpr",
"grpc_public_hdrs",
"grpc_trace",
"iomgr",
"iomgr_buffer_list",
"iomgr_internal_errqueue",
"iomgr_timer",
"legacy_context",
"orphanable",
"parse_address",
"promise",
"ref_counted_ptr",
"resource_quota_api",
"sockaddr_utils",
"stats",
"tcp_tracer",
"uri_parser",
"//src/core:1999",
"//src/core:activity",
"//src/core:all_ok",
"//src/core:arena",
"//src/core:arena_promise",
"//src/core:atomic_utils",
"//src/core:bitset",
"//src/core:call_factory",
"//src/core:call_filters",
"//src/core:call_final_info",
"//src/core:call_finalization",
"//src/core:call_spine",
"//src/core:cancel_callback",
"//src/core:channel_args",
"//src/core:channel_args_endpoint_config",
"//src/core:channel_args_preconditioning",
"//src/core:channel_fwd",
"//src/core:channel_init",
Expand All @@ -2043,75 +2025,47 @@ grpc_cc_library(
"//src/core:closure",
"//src/core:compression",
"//src/core:connectivity_state",
"//src/core:construct_destruct",
"//src/core:context",
"//src/core:default_event_engine",
"//src/core:dual_ref_counted",
"//src/core:error",
"//src/core:error_utils",
"//src/core:event_engine_common",
"//src/core:event_engine_extensions",
"//src/core:event_engine_memory_allocator_factory",
"//src/core:event_engine_query_extensions",
"//src/core:event_engine_shim",
"//src/core:event_engine_tcp_socket_utils",
"//src/core:event_engine_trace",
"//src/core:event_log",
"//src/core:event_engine_context",
"//src/core:experiments",
"//src/core:for_each",
"//src/core:gpr_atm",
"//src/core:gpr_manual_constructor",
"//src/core:gpr_spinlock",
"//src/core:grpc_sockaddr",
"//src/core:if",
"//src/core:init_internally",
"//src/core:iomgr_fwd",
"//src/core:iomgr_port",
"//src/core:json",
"//src/core:json_writer",
"//src/core:latch",
"//src/core:loop",
"//src/core:map",
"//src/core:match",
"//src/core:memory_quota",
"//src/core:message",
"//src/core:metadata",
"//src/core:metadata_batch",
"//src/core:metrics",
"//src/core:no_destruct",
"//src/core:per_cpu",
"//src/core:pipe",
"//src/core:poll",
"//src/core:pollset_set",
"//src/core:posix_event_engine_base_hdrs",
"//src/core:posix_event_engine_endpoint",
"//src/core:promise_status",
"//src/core:promise_trace",
"//src/core:race",
"//src/core:random_early_detection",
"//src/core:ref_counted",
"//src/core:resolved_address",
"//src/core:resource_quota",
"//src/core:resource_quota_trace",
"//src/core:seq",
"//src/core:server_interface",
"//src/core:slice",
"//src/core:slice_buffer",
"//src/core:slice_cast",
"//src/core:slice_refcount",
"//src/core:socket_mutator",
"//src/core:stats_data",
"//src/core:status_flag",
"//src/core:status_helper",
"//src/core:strerror",
"//src/core:thread_quota",
"//src/core:time",
"//src/core:transport_fwd",
"//src/core:try_join",
"//src/core:try_seq",
"//src/core:useful",
"//src/core:windows_event_engine",
"//src/core:windows_event_engine_listener",
],
)

Expand Down
5 changes: 0 additions & 5 deletions CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Package.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 17 additions & 10 deletions build_autogenerated.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 21b5410

Please sign in to comment.