From 0642bc213daa971821887b4d49ac20a874a780ee Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 May 2022 09:58:08 -0700 Subject: [PATCH] Revert "[iwyu] grpc++ (#29610)" (#29720) This reverts commit c8159eabdf222a444839f361e7d75b5f2f7132e2. --- BUILD | 83 +------------------ CMakeLists.txt | 62 -------------- bazel/grpc_deps.bzl | 5 -- build_autogenerated.yaml | 62 -------------- src/cpp/client/channel_cc.cc | 19 ++--- src/cpp/client/channel_test_peer.cc | 1 + src/cpp/client/client_callback.cc | 2 - src/cpp/client/client_context.cc | 18 +--- src/cpp/client/client_interceptor.cc | 3 +- src/cpp/client/create_channel.cc | 7 -- src/cpp/client/create_channel_internal.cc | 2 + src/cpp/client/create_channel_internal.h | 5 +- src/cpp/client/create_channel_posix.cc | 9 +- src/cpp/client/insecure_credentials.cc | 8 +- src/cpp/client/secure_credentials.cc | 19 +---- src/cpp/client/secure_credentials.h | 15 +--- src/cpp/client/xds_credentials.cc | 7 -- src/cpp/codegen/codegen_init.cc | 2 +- src/cpp/common/alarm.cc | 12 +-- src/cpp/common/alts_context.cc | 12 +-- src/cpp/common/alts_util.cc | 15 +--- src/cpp/common/auth_property_iterator.cc | 3 - src/cpp/common/channel_arguments.cc | 9 +- src/cpp/common/channel_filter.cc | 8 +- src/cpp/common/channel_filter.h | 22 +---- src/cpp/common/completion_queue_cc.cc | 11 +-- src/cpp/common/core_codegen.cc | 11 +-- .../common/insecure_create_auth_context.cc | 2 +- src/cpp/common/resource_quota_cc.cc | 5 -- src/cpp/common/secure_auth_context.cc | 2 - src/cpp/common/secure_auth_context.h | 6 -- src/cpp/common/secure_channel_arguments.cc | 9 +- src/cpp/common/secure_create_auth_context.cc | 3 +- src/cpp/common/tls_certificate_provider.cc | 6 +- src/cpp/common/tls_certificate_verifier.cc | 18 +--- src/cpp/common/tls_credentials_options.cc | 10 +-- src/cpp/common/validate_service_config.cc | 4 - src/cpp/common/version_cc.cc | 5 +- src/cpp/ext/filters/census/channel_filter.h | 5 +- src/cpp/ext/filters/census/client_filter.cc | 27 +----- src/cpp/ext/filters/census/client_filter.h | 7 +- src/cpp/ext/filters/census/context.cc | 5 -- src/cpp/ext/filters/census/context.h | 19 +++-- src/cpp/ext/filters/census/grpc_plugin.cc | 7 -- src/cpp/ext/filters/census/grpc_plugin.h | 2 + src/cpp/ext/filters/census/measures.h | 2 + .../filters/census/open_census_call_tracer.h | 19 ----- src/cpp/ext/filters/census/rpc_encoding.h | 4 +- src/cpp/ext/filters/census/server_filter.cc | 11 --- src/cpp/ext/filters/census/server_filter.h | 19 +---- src/cpp/ext/filters/census/views.cc | 4 - src/cpp/ext/proto_server_reflection.cc | 4 - src/cpp/ext/proto_server_reflection.h | 6 -- src/cpp/ext/proto_server_reflection_plugin.cc | 2 +- src/cpp/server/admin/admin_services.cc | 3 + src/cpp/server/async_generic_service.cc | 1 - .../server/authorization_policy_provider.cc | 8 +- src/cpp/server/channel_argument_option.cc | 8 -- src/cpp/server/channelz/channelz_service.cc | 5 +- src/cpp/server/channelz/channelz_service.h | 2 - .../channelz/channelz_service_plugin.cc | 6 +- src/cpp/server/create_default_thread_pool.cc | 1 - src/cpp/server/csds/csds.cc | 11 ++- src/cpp/server/csds/csds.h | 5 +- src/cpp/server/dynamic_thread_pool.cc | 3 + src/cpp/server/dynamic_thread_pool.h | 4 +- .../external_connection_acceptor_impl.cc | 3 - .../external_connection_acceptor_impl.h | 3 +- .../health/default_health_check_service.cc | 11 +-- .../health/default_health_check_service.h | 15 +--- ...lth_check_service_server_builder_option.cc | 7 -- src/cpp/server/insecure_server_credentials.cc | 6 -- src/cpp/server/load_reporter/constants.h | 1 - src/cpp/server/load_reporter/get_cpu_stats.h | 2 - .../load_reporter/get_cpu_stats_linux.cc | 2 - .../server/load_reporter/load_data_store.cc | 6 +- .../server/load_reporter/load_data_store.h | 11 +-- src/cpp/server/load_reporter/load_reporter.cc | 8 +- src/cpp/server/load_reporter/load_reporter.h | 15 +--- .../load_reporter_async_service_impl.cc | 9 -- .../load_reporter_async_service_impl.h | 12 --- ...reporting_service_server_builder_option.cc | 7 -- ...reporting_service_server_builder_plugin.cc | 3 - ..._reporting_service_server_builder_plugin.h | 7 -- src/cpp/server/load_reporter/util.cc | 6 -- src/cpp/server/orca/orca_service.cc | 25 ------ src/cpp/server/secure_server_credentials.cc | 13 +-- src/cpp/server/secure_server_credentials.h | 8 +- src/cpp/server/server_builder.cc | 28 +------ src/cpp/server/server_callback.cc | 2 - src/cpp/server/server_cc.cc | 44 ++-------- src/cpp/server/server_context.cc | 29 ++----- src/cpp/server/server_posix.cc | 2 - src/cpp/server/xds_server_credentials.cc | 7 -- src/cpp/thread_manager/thread_manager.cc | 5 +- src/cpp/thread_manager/thread_manager.h | 5 +- src/cpp/util/byte_buffer_cc.cc | 8 -- src/cpp/util/core_stats.cc | 9 -- src/cpp/util/status.cc | 1 - src/cpp/util/string_ref.cc | 2 - src/cpp/util/time_cc.cc | 7 +- .../src/cpp/common/version_cc.cc.template | 5 +- .../microbenchmarks/bm_opencensus_plugin.cc | 1 - .../load_reporter/load_data_store_test.cc | 1 - tools/dockerfile/grpc_iwyu/iwyu.sh | 24 ++---- .../sanity/check_bad_dependencies.sh | 2 +- 106 files changed, 164 insertions(+), 900 deletions(-) diff --git a/BUILD b/BUILD index f54262efa09..ac64c6fc1b4 100644 --- a/BUILD +++ b/BUILD @@ -473,17 +473,6 @@ grpc_cc_library( ], ) -grpc_cc_library( - name = "gpr_public_hdrs", - hdrs = GPR_PUBLIC_HDRS, -) - -grpc_cc_library( - name = "grpc_public_hdrs", - hdrs = GRPC_PUBLIC_HDRS, - deps = ["gpr_public_hdrs"], -) - grpc_cc_library( name = "grpc++_public_hdrs", hdrs = GRPCXX_PUBLIC_HDRS, @@ -492,7 +481,6 @@ grpc_cc_library( "protobuf_headers", ], visibility = ["@grpc:public"], - deps = ["grpc_public_hdrs"], ) grpc_cc_library( @@ -561,13 +549,11 @@ grpc_cc_library( deps = [ "error", "gpr_base", - "gpr_codegen", "grpc", "grpc++_base", "grpc++_codegen_base", "grpc++_codegen_base_src", "grpc++_codegen_proto", - "grpc++_internal_hdrs_only", "grpc_base", "grpc_codegen", "grpc_credentials_util", @@ -576,7 +562,6 @@ grpc_cc_library( "json", "ref_counted_ptr", "slice", - "slice_refcount", ], ) @@ -673,8 +658,6 @@ grpc_cc_library( ], language = "c++", deps = [ - "gpr", - "grpc", "grpc++_internals", ], ) @@ -693,8 +676,6 @@ grpc_cc_library( ], visibility = ["@grpc:xds"], deps = [ - "gpr", - "grpc", "grpc++_internals", ], ) @@ -716,7 +697,6 @@ grpc_cc_library( "grpc++_codegen_base", "grpc++_codegen_base_src", "grpc++_codegen_proto", - "grpc_codegen", "grpc_insecure_credentials", "grpc_unsecure", ], @@ -750,7 +730,6 @@ grpc_cc_library( "include/grpcpp/security/alts_util.h", ], external_deps = [ - "absl/memory", "upb_lib", ], language = "c++", @@ -3907,9 +3886,6 @@ grpc_cc_library( deps = [ "gpr", "gpr_codegen", - "grpc", - "grpc++", - "grpc_codegen", "lb_server_load_reporting_filter", "lb_server_load_reporting_service_server_builder_plugin", "slice", @@ -3924,15 +3900,10 @@ grpc_cc_library( hdrs = [ "src/cpp/server/load_reporter/load_reporter_async_service_impl.h", ], - external_deps = [ - "absl/memory", - "protobuf_headers", - ], + external_deps = ["absl/memory"], language = "c++", deps = [ "gpr", - "gpr_codegen", - "grpc++", "lb_load_reporter", ], ) @@ -3967,7 +3938,6 @@ grpc_cc_library( external_deps = [ "opencensus-stats", "opencensus-tags", - "protobuf_headers", ], language = "c++", deps = [ @@ -5444,8 +5414,6 @@ grpc_cc_library( srcs = GRPCXX_SRCS, hdrs = GRPCXX_HDRS, external_deps = [ - "absl/base:core_headers", - "absl/strings", "absl/synchronization", "absl/memory", "upb_lib", @@ -5455,10 +5423,8 @@ grpc_cc_library( public_hdrs = GRPCXX_PUBLIC_HDRS, visibility = ["@grpc:alt_grpc++_base_legacy"], deps = [ - "channel_init", "config", "gpr_base", - "gpr_codegen", "grpc", "grpc++_codegen_base", "grpc++_codegen_base_src", @@ -5472,10 +5438,6 @@ grpc_cc_library( "grpc_transport_inproc", "iomgr_timer", "ref_counted", - "ref_counted_ptr", - "resource_quota", - "slice", - "time", "useful", ], ) @@ -5485,8 +5447,6 @@ grpc_cc_library( srcs = GRPCXX_SRCS, hdrs = GRPCXX_HDRS, external_deps = [ - "absl/base:core_headers", - "absl/strings", "absl/synchronization", "absl/memory", "upb_lib", @@ -5497,10 +5457,8 @@ grpc_cc_library( tags = ["avoid_dep"], visibility = ["@grpc:alt_grpc++_base_unsecure_legacy"], deps = [ - "channel_init", "config", "gpr_base", - "gpr_codegen", "grpc++_codegen_base", "grpc++_codegen_base_src", "grpc++_internal_hdrs_only", @@ -5515,10 +5473,6 @@ grpc_cc_library( "grpc_unsecure", "iomgr_timer", "ref_counted", - "ref_counted_ptr", - "resource_quota", - "slice", - "time", "useful", ], ) @@ -5618,7 +5572,6 @@ grpc_cc_library( language = "c++", deps = [ "grpc++_codegen_base", - "grpc++_public_hdrs", ], ) @@ -5663,9 +5616,6 @@ grpc_cc_library( hdrs = [ "src/cpp/ext/proto_server_reflection.h", ], - external_deps = [ - "protobuf_headers", - ], language = "c++", public_hdrs = [ "include/grpc++/ext/proto_server_reflection_plugin.h", @@ -5685,9 +5635,6 @@ grpc_cc_library( "src/cpp/server/orca/orca_service.cc", ], external_deps = [ - "absl/base:core_headers", - "absl/time", - "absl/types:optional", "upb_lib", ], language = "c++", @@ -5696,15 +5643,12 @@ grpc_cc_library( ], visibility = ["@grpc:public"], deps = [ - "gpr", "grpc++", "grpc++_codegen_base", - "grpc++_internal_hdrs_only", "grpc_base", "iomgr_timer", "protobuf_duration_upb", "ref_counted", - "ref_counted_ptr", "time", "xds_orca_service_upb", "xds_orca_upb", @@ -5721,9 +5665,6 @@ grpc_cc_library( hdrs = [ "src/cpp/server/channelz/channelz_service.h", ], - external_deps = [ - "protobuf_headers", - ], language = "c++", public_hdrs = [ "include/grpcpp/ext/channelz_service_plugin.h", @@ -5733,7 +5674,6 @@ grpc_cc_library( "gpr", "grpc", "grpc++", - "grpc++_config_proto", "//src/proto/grpc/channelz:channelz_proto", ], alwayslink = 1, @@ -5747,10 +5687,7 @@ grpc_cc_library( hdrs = [ "src/cpp/server/csds/csds.h", ], - external_deps = [ - "absl/status", - "absl/status:statusor", - ], + external_deps = ["absl/status:statusor"], language = "c++", deps = [ "gpr", @@ -5825,14 +5762,10 @@ grpc_cc_library( hdrs = [ "src/cpp/util/core_stats.h", ], - external_deps = [ - "protobuf_headers", - ], language = "c++", deps = [ "gpr", "grpc++", - "grpc_base", "//src/proto/grpc/core:stats_proto", ], ) @@ -5863,14 +5796,10 @@ grpc_cc_library( external_deps = [ "absl-base", "absl-time", - "absl/base:core_headers", - "absl/status", - "absl/types:optional", "absl/strings", "opencensus-trace", "opencensus-trace-context_util", "opencensus-trace-propagation", - "opencensus-trace-span_context", "opencensus-tags", "opencensus-tags-context_util", "opencensus-stats", @@ -5879,18 +5808,10 @@ grpc_cc_library( language = "c++", visibility = ["@grpc:grpc_opencensus_plugin"], deps = [ - "arena", "census", - "channel_stack_type", - "debug_location", - "gpr", "gpr_base", - "gpr_codegen", "grpc++", - "grpc++_base", "grpc_base", - "slice", - "slice_refcount", ], ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68eb1183bc2..3ee2b4a7f8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3195,37 +3195,6 @@ foreach(_hdr include/grpc++/support/stub_options.h include/grpc++/support/sync_stream.h include/grpc++/support/time.h - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h - include/grpc/compression.h - include/grpc/fork.h - include/grpc/grpc.h - include/grpc/grpc_posix.h - include/grpc/grpc_security.h - include/grpc/grpc_security_constants.h - include/grpc/load_reporting.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h - include/grpc/support/alloc.h - include/grpc/support/atm.h - include/grpc/support/atm_gcc_atomic.h - include/grpc/support/atm_gcc_sync.h - include/grpc/support/atm_windows.h - include/grpc/support/cpu.h - include/grpc/support/log.h - include/grpc/support/log_windows.h - include/grpc/support/port_platform.h - include/grpc/support/string_util.h - include/grpc/support/sync.h - include/grpc/support/sync_abseil.h - include/grpc/support/sync_custom.h - include/grpc/support/sync_generic.h - include/grpc/support/sync_posix.h - include/grpc/support/sync_windows.h - include/grpc/support/thd_id.h - include/grpc/support/time.h - include/grpc/support/workaround_list.h include/grpcpp/alarm.h include/grpcpp/channel.h include/grpcpp/client_context.h @@ -3883,37 +3852,6 @@ foreach(_hdr include/grpc++/support/stub_options.h include/grpc++/support/sync_stream.h include/grpc++/support/time.h - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h - include/grpc/compression.h - include/grpc/fork.h - include/grpc/grpc.h - include/grpc/grpc_posix.h - include/grpc/grpc_security.h - include/grpc/grpc_security_constants.h - include/grpc/load_reporting.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h - include/grpc/support/alloc.h - include/grpc/support/atm.h - include/grpc/support/atm_gcc_atomic.h - include/grpc/support/atm_gcc_sync.h - include/grpc/support/atm_windows.h - include/grpc/support/cpu.h - include/grpc/support/log.h - include/grpc/support/log_windows.h - include/grpc/support/port_platform.h - include/grpc/support/string_util.h - include/grpc/support/sync.h - include/grpc/support/sync_abseil.h - include/grpc/support/sync_custom.h - include/grpc/support/sync_generic.h - include/grpc/support/sync_posix.h - include/grpc/support/sync_windows.h - include/grpc/support/thd_id.h - include/grpc/support/time.h - include/grpc/support/workaround_list.h include/grpcpp/alarm.h include/grpcpp/channel.h include/grpcpp/client_context.h diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index bae066d7396..40292ca657e 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -155,11 +155,6 @@ def grpc_deps(): actual = "@io_opencensus_cpp//opencensus/trace:grpc_trace_bin", ) - native.bind( - name = "opencensus-trace-span_context", - actual = "@io_opencensus_cpp//opencensus/trace:span_context", - ) - native.bind( name = "opencensus-stats", actual = "@io_opencensus_cpp//opencensus/stats:stats", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 7d52b1d76d3..eca57d423e7 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -2564,37 +2564,6 @@ libs: - include/grpc++/support/stub_options.h - include/grpc++/support/sync_stream.h - include/grpc++/support/time.h - - include/grpc/byte_buffer.h - - include/grpc/byte_buffer_reader.h - - include/grpc/compression.h - - include/grpc/fork.h - - include/grpc/grpc.h - - include/grpc/grpc_posix.h - - include/grpc/grpc_security.h - - include/grpc/grpc_security_constants.h - - include/grpc/load_reporting.h - - include/grpc/slice.h - - include/grpc/slice_buffer.h - - include/grpc/status.h - - include/grpc/support/alloc.h - - include/grpc/support/atm.h - - include/grpc/support/atm_gcc_atomic.h - - include/grpc/support/atm_gcc_sync.h - - include/grpc/support/atm_windows.h - - include/grpc/support/cpu.h - - include/grpc/support/log.h - - include/grpc/support/log_windows.h - - include/grpc/support/port_platform.h - - include/grpc/support/string_util.h - - include/grpc/support/sync.h - - include/grpc/support/sync_abseil.h - - include/grpc/support/sync_custom.h - - include/grpc/support/sync_generic.h - - include/grpc/support/sync_posix.h - - include/grpc/support/sync_windows.h - - include/grpc/support/thd_id.h - - include/grpc/support/time.h - - include/grpc/support/workaround_list.h - include/grpcpp/alarm.h - include/grpcpp/channel.h - include/grpcpp/client_context.h @@ -2982,37 +2951,6 @@ libs: - include/grpc++/support/stub_options.h - include/grpc++/support/sync_stream.h - include/grpc++/support/time.h - - include/grpc/byte_buffer.h - - include/grpc/byte_buffer_reader.h - - include/grpc/compression.h - - include/grpc/fork.h - - include/grpc/grpc.h - - include/grpc/grpc_posix.h - - include/grpc/grpc_security.h - - include/grpc/grpc_security_constants.h - - include/grpc/load_reporting.h - - include/grpc/slice.h - - include/grpc/slice_buffer.h - - include/grpc/status.h - - include/grpc/support/alloc.h - - include/grpc/support/atm.h - - include/grpc/support/atm_gcc_atomic.h - - include/grpc/support/atm_gcc_sync.h - - include/grpc/support/atm_windows.h - - include/grpc/support/cpu.h - - include/grpc/support/log.h - - include/grpc/support/log_windows.h - - include/grpc/support/port_platform.h - - include/grpc/support/string_util.h - - include/grpc/support/sync.h - - include/grpc/support/sync_abseil.h - - include/grpc/support/sync_custom.h - - include/grpc/support/sync_generic.h - - include/grpc/support/sync_posix.h - - include/grpc/support/sync_windows.h - - include/grpc/support/thd_id.h - - include/grpc/support/time.h - - include/grpc/support/workaround_list.h - include/grpcpp/alarm.h - include/grpcpp/channel.h - include/grpcpp/client_context.h diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc index 4f92d670688..e4aa072db00 100644 --- a/src/cpp/client/channel_cc.cc +++ b/src/cpp/client/channel_cc.cc @@ -16,36 +16,31 @@ * */ -#include #include #include -#include -#include -#include #include -#include -#include -#include #include #include #include +#include +#include #include #include #include #include #include -#include #include -#include -#include #include #include -#include +#include +#include #include -#include +#include +#include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/surface/completion_queue.h" namespace grpc { diff --git a/src/cpp/client/channel_test_peer.cc b/src/cpp/client/channel_test_peer.cc index d91f692ea6e..de9779011ee 100644 --- a/src/cpp/client/channel_test_peer.cc +++ b/src/cpp/client/channel_test_peer.cc @@ -16,6 +16,7 @@ * */ +#include #include #include diff --git a/src/cpp/client/client_callback.cc b/src/cpp/client/client_callback.cc index 719b8597052..9e4ebbb3f82 100644 --- a/src/cpp/client/client_callback.cc +++ b/src/cpp/client/client_callback.cc @@ -16,10 +16,8 @@ */ #include -#include #include "src/core/lib/iomgr/closure.h" -#include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/surface/call.h" diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index a6c5c70dcdc..72e6653f0e7 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -16,32 +16,18 @@ * */ -#include - -#include -#include -#include -#include -#include - #include #include -#include -#include -#include -#include #include #include -#include -#include +#include #include #include #include #include #include #include -#include -#include +#include namespace grpc { diff --git a/src/cpp/client/client_interceptor.cc b/src/cpp/client/client_interceptor.cc index f4e4acbed19..a91950cae2d 100644 --- a/src/cpp/client/client_interceptor.cc +++ b/src/cpp/client/client_interceptor.cc @@ -16,8 +16,7 @@ * */ -#include -#include +#include namespace grpc { diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc index 34b9227ddd9..48831d0fede 100644 --- a/src/cpp/client/create_channel.cc +++ b/src/cpp/client/create_channel.cc @@ -17,19 +17,12 @@ */ #include -#include -#include -#include -#include -#include #include #include #include #include #include -#include -#include #include "src/cpp/client/create_channel_internal.h" diff --git a/src/cpp/client/create_channel_internal.cc b/src/cpp/client/create_channel_internal.cc index 06ccc0d5ad0..3523d503a95 100644 --- a/src/cpp/client/create_channel_internal.cc +++ b/src/cpp/client/create_channel_internal.cc @@ -25,6 +25,8 @@ #include +struct grpc_channel; + namespace grpc { std::shared_ptr CreateChannelInternal( diff --git a/src/cpp/client/create_channel_internal.h b/src/cpp/client/create_channel_internal.h index c737fdcbeea..997b3769d22 100644 --- a/src/cpp/client/create_channel_internal.h +++ b/src/cpp/client/create_channel_internal.h @@ -23,11 +23,12 @@ #include #include -#include #include -#include +#include #include +struct grpc_channel; + namespace grpc { std::shared_ptr CreateChannelInternal( diff --git a/src/cpp/client/create_channel_posix.cc b/src/cpp/client/create_channel_posix.cc index f9f2012817e..8e02088ac38 100644 --- a/src/cpp/client/create_channel_posix.cc +++ b/src/cpp/client/create_channel_posix.cc @@ -16,20 +16,13 @@ * */ -#include -#include -#include -#include - #include #include #include -#include #include #include +#include #include -#include -#include #include "src/cpp/client/create_channel_internal.h" diff --git a/src/cpp/client/insecure_credentials.cc b/src/cpp/client/insecure_credentials.cc index 95f770cc3af..b7727436ba8 100644 --- a/src/cpp/client/insecure_credentials.cc +++ b/src/cpp/client/insecure_credentials.cc @@ -15,18 +15,12 @@ * limitations under the License. * */ -#include -#include -#include -#include - #include #include -#include +#include #include #include #include -#include #include #include "src/cpp/client/create_channel_internal.h" diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 086a562e1f8..d3351e3447c 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -18,37 +18,26 @@ #include "src/cpp/client/secure_credentials.h" -#include - -#include -#include -#include - #include "absl/strings/str_join.h" -#include -#include +#include #include #include #include #include -#include #include +#include #include -#include #include -#include -#include -#include + // TODO(yashykt): We shouldn't be including "src/core" headers. #include "src/core/lib/gpr/env.h" -#include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/json/json.h" +#include "src/core/lib/security/transport/auth_filters.h" #include "src/core/lib/security/util/json_util.h" -#include "src/core/lib/slice/slice_refcount.h" #include "src/cpp/client/create_channel_internal.h" #include "src/cpp/common/secure_auth_context.h" diff --git a/src/cpp/client/secure_credentials.h b/src/cpp/client/secure_credentials.h index 29496f7c4f9..992e2237593 100644 --- a/src/cpp/client/secure_credentials.h +++ b/src/cpp/client/secure_credentials.h @@ -19,26 +19,13 @@ #ifndef GRPC_INTERNAL_CPP_CLIENT_SECURE_CREDENTIALS_H #define GRPC_INTERNAL_CPP_CLIENT_SECURE_CREDENTIALS_H -#include - -#include -#include -#include - #include "absl/strings/str_cat.h" -#include #include -#include -#include -#include -#include #include -#include -#include +#include #include // TODO(yashykt): We shouldn't be including "src/core" headers. -#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/cpp/server/thread_pool_interface.h" diff --git a/src/cpp/client/xds_credentials.cc b/src/cpp/client/xds_credentials.cc index 360d44c94b2..d5446a02fe5 100644 --- a/src/cpp/client/xds_credentials.cc +++ b/src/cpp/client/xds_credentials.cc @@ -16,13 +16,6 @@ // // -#include - -#include -#include -#include -#include - #include "src/cpp/client/secure_credentials.h" namespace grpc { diff --git a/src/cpp/codegen/codegen_init.cc b/src/cpp/codegen/codegen_init.cc index 4e1176f1f0f..e1e47cbb17b 100644 --- a/src/cpp/codegen/codegen_init.cc +++ b/src/cpp/codegen/codegen_init.cc @@ -17,7 +17,7 @@ */ #include -#include +#include /// Null-initializes the global gRPC variables for the codegen library. These /// stay null in the absence of grpc++ library. In this case, no gRPC diff --git a/src/cpp/common/alarm.cc b/src/cpp/common/alarm.cc index 47b047823c1..913c0c7317c 100644 --- a/src/cpp/common/alarm.cc +++ b/src/cpp/common/alarm.cc @@ -17,21 +17,15 @@ #include -#include -#include +#include -#include -#include #include -#include #include #include -#include #include +#include -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/iomgr/closure.h" -#include "src/core/lib/iomgr/error.h" +#include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/timer.h" diff --git a/src/cpp/common/alts_context.cc b/src/cpp/common/alts_context.cc index 674c898ef6f..5e674ff7240 100644 --- a/src/cpp/common/alts_context.cc +++ b/src/cpp/common/alts_context.cc @@ -16,19 +16,11 @@ * */ -#include - -#include -#include - -#include "upb/upb.h" - -#include +#include #include -#include +#include "src/core/tsi/alts/handshaker/alts_tsi_handshaker.h" #include "src/proto/grpc/gcp/altscontext.upb.h" -#include "src/proto/grpc/gcp/transport_security_common.upb.h" namespace grpc { namespace experimental { diff --git a/src/cpp/common/alts_util.cc b/src/cpp/common/alts_util.cc index 7cf05a4a753..b1dc38d01a0 100644 --- a/src/cpp/common/alts_util.cc +++ b/src/cpp/common/alts_util.cc @@ -16,25 +16,16 @@ * */ -#include -#include -#include -#include - -#include "absl/memory/memory.h" #include "upb/upb.hpp" -#include +#include #include #include #include -#include -#include -#include -#include -#include +#include "src/core/lib/gprpp/memory.h" #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker.h" +#include "src/cpp/common/secure_auth_context.h" #include "src/proto/grpc/gcp/altscontext.upb.h" namespace grpc { diff --git a/src/cpp/common/auth_property_iterator.cc b/src/cpp/common/auth_property_iterator.cc index 45d6db9c3cf..1334ea99663 100644 --- a/src/cpp/common/auth_property_iterator.cc +++ b/src/cpp/common/auth_property_iterator.cc @@ -16,11 +16,8 @@ * */ -#include - #include #include -#include namespace grpc { diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index 2308739a385..6c45dda2de4 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -15,20 +15,15 @@ * limitations under the License. * */ -#include -#include -#include -#include -#include +#include -#include #include #include #include #include #include -#include +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/socket_mutator.h" diff --git a/src/cpp/common/channel_filter.cc b/src/cpp/common/channel_filter.cc index 88916bec8ac..5ea832c4018 100644 --- a/src/cpp/common/channel_filter.cc +++ b/src/cpp/common/channel_filter.cc @@ -18,17 +18,13 @@ #include "src/cpp/common/channel_filter.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/string_view.h" +#include -#include +#include -#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/slice/slice.h" -#include "src/core/lib/surface/channel_init.h" namespace grpc { diff --git a/src/cpp/common/channel_filter.h b/src/cpp/common/channel_filter.h index 105b973229d..3d8d155b753 100644 --- a/src/cpp/common/channel_filter.h +++ b/src/cpp/common/channel_filter.h @@ -19,30 +19,16 @@ #ifndef GRPCXX_CHANNEL_FILTER_H #define GRPCXX_CHANNEL_FILTER_H -#include -#include - #include -#include -#include -#include +#include #include -#include -#include -#include +#include +#include #include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/channel/channel_stack_builder.h" -#include "src/core/lib/channel/context.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/iomgr/closure.h" -#include "src/core/lib/iomgr/error.h" -#include "src/core/lib/iomgr/polling_entity.h" -#include "src/core/lib/surface/channel_stack_type.h" -#include "src/core/lib/transport/byte_stream.h" +#include "src/core/lib/surface/channel_init.h" #include "src/core/lib/transport/metadata_batch.h" -#include "src/core/lib/transport/transport.h" /// An interface to define filters. /// diff --git a/src/cpp/common/completion_queue_cc.cc b/src/cpp/common/completion_queue_cc.cc index 7a22a48bb41..078f928fde9 100644 --- a/src/cpp/common/completion_queue_cc.cc +++ b/src/cpp/common/completion_queue_cc.cc @@ -15,22 +15,17 @@ * */ -#include - -#include "absl/base/thread_annotations.h" +#include #include -#include -#include #include #include -#include -#include #include -#include #include +#include #include "src/core/lib/gpr/useful.h" +#include "src/core/lib/gprpp/manual_constructor.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/thd.h" diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index cf5dc084b5c..6501650aeb0 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -21,18 +21,19 @@ #include #include +#include #include -#include -#include #include #include -#include #include #include #include -#include #include -#include +#include + +#include "src/core/lib/profiling/timers.h" + +struct grpc_byte_buffer; namespace grpc { diff --git a/src/cpp/common/insecure_create_auth_context.cc b/src/cpp/common/insecure_create_auth_context.cc index adcf4e77a37..4e5cbd03723 100644 --- a/src/cpp/common/insecure_create_auth_context.cc +++ b/src/cpp/common/insecure_create_auth_context.cc @@ -17,7 +17,7 @@ */ #include -#include +#include #include namespace grpc { diff --git a/src/cpp/common/resource_quota_cc.cc b/src/cpp/common/resource_quota_cc.cc index a52ea59e0ea..25aa01ed015 100644 --- a/src/cpp/common/resource_quota_cc.cc +++ b/src/cpp/common/resource_quota_cc.cc @@ -16,13 +16,8 @@ * */ -#include - -#include - #include #include -#include namespace grpc { diff --git a/src/cpp/common/secure_auth_context.cc b/src/cpp/common/secure_auth_context.cc index 35795db5117..0ba01e5553f 100644 --- a/src/cpp/common/secure_auth_context.cc +++ b/src/cpp/common/secure_auth_context.cc @@ -18,8 +18,6 @@ #include "src/cpp/common/secure_auth_context.h" -#include - #include namespace grpc { diff --git a/src/cpp/common/secure_auth_context.h b/src/cpp/common/secure_auth_context.h index e89801fcff1..83c222749b8 100644 --- a/src/cpp/common/secure_auth_context.h +++ b/src/cpp/common/secure_auth_context.h @@ -19,13 +19,7 @@ #ifndef GRPC_INTERNAL_CPP_COMMON_SECURE_AUTH_CONTEXT_H #define GRPC_INTERNAL_CPP_COMMON_SECURE_AUTH_CONTEXT_H -#include -#include - -#include #include -#include -#include #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/context/security_context.h" diff --git a/src/cpp/common/secure_channel_arguments.cc b/src/cpp/common/secure_channel_arguments.cc index a893cf36253..339d94b1dde 100644 --- a/src/cpp/common/secure_channel_arguments.cc +++ b/src/cpp/common/secure_channel_arguments.cc @@ -16,13 +16,10 @@ * */ -#include -#include -#include - -#include +#include #include -#include + +#include "src/core/lib/channel/channel_args.h" namespace grpc { diff --git a/src/cpp/common/secure_create_auth_context.cc b/src/cpp/common/secure_create_auth_context.cc index feb3885d528..6633374b65b 100644 --- a/src/cpp/common/secure_create_auth_context.cc +++ b/src/cpp/common/secure_create_auth_context.cc @@ -17,12 +17,11 @@ */ #include +#include #include -#include #include #include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/security/context/security_context.h" #include "src/cpp/common/secure_auth_context.h" namespace grpc { diff --git a/src/cpp/common/tls_certificate_provider.cc b/src/cpp/common/tls_certificate_provider.cc index f802ab1870b..62a2a5cf26b 100644 --- a/src/cpp/common/tls_certificate_provider.cc +++ b/src/cpp/common/tls_certificate_provider.cc @@ -14,13 +14,11 @@ // limitations under the License. // -#include -#include +#include "absl/container/inlined_vector.h" #include -#include +#include #include -#include namespace grpc { namespace experimental { diff --git a/src/cpp/common/tls_certificate_verifier.cc b/src/cpp/common/tls_certificate_verifier.cc index f55637088b0..2e52548fd3b 100644 --- a/src/cpp/common/tls_certificate_verifier.cc +++ b/src/cpp/common/tls_certificate_verifier.cc @@ -14,27 +14,13 @@ // limitations under the License. // -#include - -#include -#include -#include -#include -#include -#include +#include "absl/container/inlined_vector.h" +#include "absl/status/status.h" #include -#include #include -#include #include -#include -#include #include -#include -#include -#include -#include namespace grpc { namespace experimental { diff --git a/src/cpp/common/tls_credentials_options.cc b/src/cpp/common/tls_credentials_options.cc index f60c19e759b..3e561561c27 100644 --- a/src/cpp/common/tls_credentials_options.cc +++ b/src/cpp/common/tls_credentials_options.cc @@ -16,17 +16,11 @@ * */ -#include -#include -#include +#include "absl/container/inlined_vector.h" #include -#include -#include -#include -#include +#include #include -#include namespace grpc { namespace experimental { diff --git a/src/cpp/common/validate_service_config.cc b/src/cpp/common/validate_service_config.cc index 5f68013660a..c444ea2d62e 100644 --- a/src/cpp/common/validate_service_config.cc +++ b/src/cpp/common/validate_service_config.cc @@ -16,13 +16,9 @@ * */ -#include - #include -#include #include -#include "src/core/lib/iomgr/error.h" #include "src/core/lib/service_config/service_config_impl.h" namespace grpc { diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc index e2acc38ae79..e296a5204e9 100644 --- a/src/cpp/common/version_cc.cc +++ b/src/cpp/common/version_cc.cc @@ -17,12 +17,9 @@ */ /* This file is autogenerated from: - templates/src/cpp/common/version_cc.cc.template */ - -#include + templates/src/core/surface/version.c.template */ #include -#include namespace grpc { std::string Version() { return "1.47.0-dev"; } diff --git a/src/cpp/ext/filters/census/channel_filter.h b/src/cpp/ext/filters/census/channel_filter.h index 2b167c8b254..d756f23258e 100644 --- a/src/cpp/ext/filters/census/channel_filter.h +++ b/src/cpp/ext/filters/census/channel_filter.h @@ -21,10 +21,7 @@ #include -#include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/channel/channel_stack_builder.h" -#include "src/core/lib/iomgr/error.h" -#include "src/cpp/common/channel_filter.h" +#include "src/cpp/ext/filters/census/context.h" namespace grpc { diff --git a/src/cpp/ext/filters/census/client_filter.cc b/src/cpp/ext/filters/census/client_filter.cc index 9ad447b4237..618324f523a 100644 --- a/src/cpp/ext/filters/census/client_filter.cc +++ b/src/cpp/ext/filters/census/client_filter.cc @@ -20,41 +20,18 @@ #include "src/cpp/ext/filters/census/client_filter.h" -#include -#include - -#include #include #include #include -#include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "absl/time/clock.h" -#include "absl/time/time.h" -#include "absl/types/optional.h" #include "opencensus/stats/stats.h" +#include "opencensus/tags/context_util.h" #include "opencensus/tags/tag_key.h" #include "opencensus/tags/tag_map.h" -#include "opencensus/trace/span.h" -#include "opencensus/trace/span_context.h" -#include "opencensus/trace/status_code.h" - -#include -#include -#include -#include -#include "src/core/lib/channel/context.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/resource_quota/arena.h" -#include "src/core/lib/slice/slice.h" -#include "src/core/lib/slice/slice_refcount.h" -#include "src/core/lib/transport/byte_stream.h" -#include "src/core/lib/transport/metadata_batch.h" -#include "src/core/lib/transport/transport.h" -#include "src/cpp/ext/filters/census/context.h" +#include "src/core/lib/surface/call.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" #include "src/cpp/ext/filters/census/measures.h" diff --git a/src/cpp/ext/filters/census/client_filter.h b/src/cpp/ext/filters/census/client_filter.h index a7c431719d7..871b8faa14b 100644 --- a/src/cpp/ext/filters/census/client_filter.h +++ b/src/cpp/ext/filters/census/client_filter.h @@ -21,9 +21,10 @@ #include -#include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/iomgr/error.h" -#include "src/cpp/common/channel_filter.h" +#include "absl/strings/string_view.h" +#include "absl/time/time.h" + +#include "src/cpp/ext/filters/census/channel_filter.h" #include "src/cpp/ext/filters/census/open_census_call_tracer.h" namespace grpc { diff --git a/src/cpp/ext/filters/census/context.cc b/src/cpp/ext/filters/census/context.cc index 9e5ead22ace..672228a83bf 100644 --- a/src/cpp/ext/filters/census/context.cc +++ b/src/cpp/ext/filters/census/context.cc @@ -20,15 +20,10 @@ #include "src/cpp/ext/filters/census/context.h" -#include - #include "opencensus/tags/context_util.h" #include "opencensus/trace/context_util.h" #include "opencensus/trace/propagation/grpc_trace_bin.h" -#include "src/core/lib/transport/transport.h" -#include "src/cpp/ext/filters/census/rpc_encoding.h" - namespace grpc { using ::opencensus::tags::TagMap; diff --git a/src/cpp/ext/filters/census/context.h b/src/cpp/ext/filters/census/context.h index e38fda8cda1..608a93b9704 100644 --- a/src/cpp/ext/filters/census/context.h +++ b/src/cpp/ext/filters/census/context.h @@ -21,22 +21,25 @@ #include -#include -#include - +#include "absl/memory/memory.h" #include "absl/strings/string_view.h" #include "absl/strings/strip.h" +#include "opencensus/context/context.h" #include "opencensus/tags/tag_map.h" -#include "opencensus/trace/attribute_value_ref.h" +#include "opencensus/trace/context_util.h" #include "opencensus/trace/span.h" #include "opencensus/trace/span_context.h" +#include "opencensus/trace/trace_params.h" -#include -#include #include -#include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/slice/slice.h" +#include "src/core/lib/slice/slice_internal.h" +#include "src/cpp/common/channel_filter.h" +#include "src/cpp/ext/filters/census/rpc_encoding.h" + +// This is needed because grpc has hardcoded CensusContext with a +// forward declaration of 'struct census_context;' +struct census_context; namespace grpc { diff --git a/src/cpp/ext/filters/census/grpc_plugin.cc b/src/cpp/ext/filters/census/grpc_plugin.cc index 6a1d823fc9b..41ded5cbcc0 100644 --- a/src/cpp/ext/filters/census/grpc_plugin.cc +++ b/src/cpp/ext/filters/census/grpc_plugin.cc @@ -20,20 +20,13 @@ #include "src/cpp/ext/filters/census/grpc_plugin.h" -#include - -#include "absl/base/attributes.h" #include "opencensus/tags/tag_key.h" #include "opencensus/trace/span.h" -#include #include -#include "src/core/lib/surface/channel_stack_type.h" -#include "src/cpp/common/channel_filter.h" #include "src/cpp/ext/filters/census/channel_filter.h" #include "src/cpp/ext/filters/census/client_filter.h" -#include "src/cpp/ext/filters/census/context.h" #include "src/cpp/ext/filters/census/measures.h" #include "src/cpp/ext/filters/census/server_filter.h" diff --git a/src/cpp/ext/filters/census/grpc_plugin.h b/src/cpp/ext/filters/census/grpc_plugin.h index 3c424b815de..54754aa88fa 100644 --- a/src/cpp/ext/filters/census/grpc_plugin.h +++ b/src/cpp/ext/filters/census/grpc_plugin.h @@ -25,6 +25,8 @@ #include "opencensus/stats/stats.h" #include "opencensus/tags/tag_key.h" +#include + namespace grpc { // The tag keys set when recording RPC stats. diff --git a/src/cpp/ext/filters/census/measures.h b/src/cpp/ext/filters/census/measures.h index 6709323c65a..0682f2e5b87 100644 --- a/src/cpp/ext/filters/census/measures.h +++ b/src/cpp/ext/filters/census/measures.h @@ -23,6 +23,8 @@ #include "opencensus/stats/stats.h" +#include "src/cpp/ext/filters/census/grpc_plugin.h" + namespace grpc { ::opencensus::stats::MeasureInt64 RpcClientSentMessagesPerRpc(); diff --git a/src/cpp/ext/filters/census/open_census_call_tracer.h b/src/cpp/ext/filters/census/open_census_call_tracer.h index 990630c17ed..d856afbe51e 100644 --- a/src/cpp/ext/filters/census/open_census_call_tracer.h +++ b/src/cpp/ext/filters/census/open_census_call_tracer.h @@ -21,26 +21,7 @@ #include -#include - -#include "absl/base/thread_annotations.h" -#include "absl/status/status.h" -#include "absl/strings/string_view.h" -#include "absl/time/time.h" - -#include -#include - #include "src/core/lib/channel/call_tracer.h" -#include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/channel/context.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/iomgr/error.h" -#include "src/core/lib/resource_quota/arena.h" -#include "src/core/lib/slice/slice.h" -#include "src/core/lib/transport/byte_stream.h" -#include "src/core/lib/transport/metadata_batch.h" -#include "src/core/lib/transport/transport.h" #include "src/cpp/ext/filters/census/context.h" namespace grpc { diff --git a/src/cpp/ext/filters/census/rpc_encoding.h b/src/cpp/ext/filters/census/rpc_encoding.h index daec6e5ea79..821c7158dd9 100644 --- a/src/cpp/ext/filters/census/rpc_encoding.h +++ b/src/cpp/ext/filters/census/rpc_encoding.h @@ -21,11 +21,13 @@ #include -#include #include #include "absl/base/internal/endian.h" #include "absl/strings/string_view.h" +#include "opencensus/trace/span_context.h" +#include "opencensus/trace/span_id.h" +#include "opencensus/trace/trace_id.h" namespace grpc { diff --git a/src/cpp/ext/filters/census/server_filter.cc b/src/cpp/ext/filters/census/server_filter.cc index fe6d013d8aa..011cd420755 100644 --- a/src/cpp/ext/filters/census/server_filter.cc +++ b/src/cpp/ext/filters/census/server_filter.cc @@ -20,24 +20,13 @@ #include "src/cpp/ext/filters/census/server_filter.h" -#include -#include - #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/time/clock.h" #include "absl/time/time.h" -#include "absl/types/optional.h" #include "opencensus/stats/stats.h" -#include "opencensus/tags/tag_key.h" - -#include -#include -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/surface/call.h" -#include "src/core/lib/transport/transport.h" -#include "src/cpp/ext/filters/census/channel_filter.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" #include "src/cpp/ext/filters/census/measures.h" diff --git a/src/cpp/ext/filters/census/server_filter.h b/src/cpp/ext/filters/census/server_filter.h index 07542d374e2..de20b0b2415 100644 --- a/src/cpp/ext/filters/census/server_filter.h +++ b/src/cpp/ext/filters/census/server_filter.h @@ -21,26 +21,13 @@ #include -#include -#include - -#include - #include "absl/strings/string_view.h" +#include "absl/time/clock.h" #include "absl/time/time.h" #include -#include -#include - -#include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/iomgr/closure.h" -#include "src/core/lib/iomgr/error.h" -#include "src/core/lib/slice/slice.h" -#include "src/core/lib/transport/byte_stream.h" -#include "src/core/lib/transport/metadata_batch.h" -#include "src/cpp/common/channel_filter.h" + +#include "src/cpp/ext/filters/census/channel_filter.h" #include "src/cpp/ext/filters/census/context.h" namespace grpc { diff --git a/src/cpp/ext/filters/census/views.cc b/src/cpp/ext/filters/census/views.cc index 9586eab5f12..926e842551c 100644 --- a/src/cpp/ext/filters/census/views.cc +++ b/src/cpp/ext/filters/census/views.cc @@ -18,15 +18,11 @@ #include -#include - #include "absl/time/time.h" #include "opencensus/stats/internal/aggregation_window.h" #include "opencensus/stats/internal/set_aggregation_window.h" #include "opencensus/stats/stats.h" -#include - #include "src/cpp/ext/filters/census/grpc_plugin.h" namespace grpc { diff --git a/src/cpp/ext/proto_server_reflection.cc b/src/cpp/ext/proto_server_reflection.cc index f1df079ef24..af35a28564e 100644 --- a/src/cpp/ext/proto_server_reflection.cc +++ b/src/cpp/ext/proto_server_reflection.cc @@ -21,11 +21,7 @@ #include #include -#include - #include -#include -#include using grpc::Status; using grpc::StatusCode; diff --git a/src/cpp/ext/proto_server_reflection.h b/src/cpp/ext/proto_server_reflection.h index a9b5db0b272..04f1e6380c5 100644 --- a/src/cpp/ext/proto_server_reflection.h +++ b/src/cpp/ext/proto_server_reflection.h @@ -19,18 +19,12 @@ #ifndef GRPC_INTERNAL_CPP_EXT_PROTO_SERVER_REFLECTION_H #define GRPC_INTERNAL_CPP_EXT_PROTO_SERVER_REFLECTION_H -#include #include #include #include -#include -#include -#include -#include #include "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h" -#include "src/proto/grpc/reflection/v1alpha/reflection.pb.h" namespace grpc { diff --git a/src/cpp/ext/proto_server_reflection_plugin.cc b/src/cpp/ext/proto_server_reflection_plugin.cc index ca844bcf0b1..c3c2bfb5104 100644 --- a/src/cpp/ext/proto_server_reflection_plugin.cc +++ b/src/cpp/ext/proto_server_reflection_plugin.cc @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "src/cpp/ext/proto_server_reflection.h" diff --git a/src/cpp/server/admin/admin_services.cc b/src/cpp/server/admin/admin_services.cc index aee9a61d3d9..7a8713d1768 100644 --- a/src/cpp/server/admin/admin_services.cc +++ b/src/cpp/server/admin/admin_services.cc @@ -18,7 +18,10 @@ #include +#include "absl/memory/memory.h" + #include +#include #include // TODO(lidiz) build a real registration system that can pull in services diff --git a/src/cpp/server/async_generic_service.cc b/src/cpp/server/async_generic_service.cc index 15381fafef4..9580219ec15 100644 --- a/src/cpp/server/async_generic_service.cc +++ b/src/cpp/server/async_generic_service.cc @@ -16,7 +16,6 @@ * */ -#include #include #include diff --git a/src/cpp/server/authorization_policy_provider.cc b/src/cpp/server/authorization_policy_provider.cc index 72ce62f9faa..8dab33ddc3e 100644 --- a/src/cpp/server/authorization_policy_provider.cc +++ b/src/cpp/server/authorization_policy_provider.cc @@ -12,16 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include - #include -#include #include +#include #include -#include -#include -#include namespace grpc { namespace experimental { diff --git a/src/cpp/server/channel_argument_option.cc b/src/cpp/server/channel_argument_option.cc index 4c032bd4e98..680b0ee0484 100644 --- a/src/cpp/server/channel_argument_option.cc +++ b/src/cpp/server/channel_argument_option.cc @@ -16,15 +16,7 @@ * */ -#include -#include -#include - #include -#include -#include -#include -#include namespace grpc { diff --git a/src/cpp/server/channelz/channelz_service.cc b/src/cpp/server/channelz/channelz_service.cc index d5e5982a9ce..6dcf84bf40d 100644 --- a/src/cpp/server/channelz/channelz_service.cc +++ b/src/cpp/server/channelz/channelz_service.cc @@ -20,11 +20,8 @@ #include "src/cpp/server/channelz/channelz_service.h" -#include - +#include #include -#include -#include namespace grpc { diff --git a/src/cpp/server/channelz/channelz_service.h b/src/cpp/server/channelz/channelz_service.h index 91936da959e..824f0a9fe17 100644 --- a/src/cpp/server/channelz/channelz_service.h +++ b/src/cpp/server/channelz/channelz_service.h @@ -22,10 +22,8 @@ #include #include -#include #include "src/proto/grpc/channelz/channelz.grpc.pb.h" -#include "src/proto/grpc/channelz/channelz.pb.h" namespace grpc { diff --git a/src/cpp/server/channelz/channelz_service_plugin.cc b/src/cpp/server/channelz/channelz_service_plugin.cc index 541dea2e812..2fc5b2a6d05 100644 --- a/src/cpp/server/channelz/channelz_service_plugin.cc +++ b/src/cpp/server/channelz/channelz_service_plugin.cc @@ -18,14 +18,10 @@ #include -#include -#include - #include #include #include -#include -#include +#include #include "src/cpp/server/channelz/channelz_service.h" diff --git a/src/cpp/server/create_default_thread_pool.cc b/src/cpp/server/create_default_thread_pool.cc index 89d5914d098..8ca3e32c2fb 100644 --- a/src/cpp/server/create_default_thread_pool.cc +++ b/src/cpp/server/create_default_thread_pool.cc @@ -19,7 +19,6 @@ #include #include "src/cpp/server/dynamic_thread_pool.h" -#include "src/cpp/server/thread_pool_interface.h" #ifndef GRPC_CUSTOM_DEFAULT_THREAD_POOL diff --git a/src/cpp/server/csds/csds.cc b/src/cpp/server/csds/csds.cc index 5042456221f..61de37604dc 100644 --- a/src/cpp/server/csds/csds.cc +++ b/src/cpp/server/csds/csds.cc @@ -21,15 +21,14 @@ #include "src/cpp/server/csds/csds.h" #include -#include -#include "absl/status/status.h" #include "absl/status/statusor.h" -#include -#include -#include -#include +#include +#include +#include + +#include "src/proto/grpc/testing/xds/v3/csds.grpc.pb.h" namespace grpc { namespace xds { diff --git a/src/cpp/server/csds/csds.h b/src/cpp/server/csds/csds.h index cd1a5900dec..d08e15241f0 100644 --- a/src/cpp/server/csds/csds.h +++ b/src/cpp/server/csds/csds.h @@ -21,12 +21,11 @@ #include +#include "absl/status/status.h" + #include -#include -#include #include "src/proto/grpc/testing/xds/v3/csds.grpc.pb.h" -#include "src/proto/grpc/testing/xds/v3/csds.pb.h" namespace grpc { namespace xds { diff --git a/src/cpp/server/dynamic_thread_pool.cc b/src/cpp/server/dynamic_thread_pool.cc index 2a3d5bc576b..e96dc4c4551 100644 --- a/src/cpp/server/dynamic_thread_pool.cc +++ b/src/cpp/server/dynamic_thread_pool.cc @@ -18,6 +18,9 @@ #include "src/cpp/server/dynamic_thread_pool.h" +#include +#include + #include "src/core/lib/gprpp/thd.h" namespace grpc { diff --git a/src/cpp/server/dynamic_thread_pool.h b/src/cpp/server/dynamic_thread_pool.h index 34de51a59c2..954aaff35da 100644 --- a/src/cpp/server/dynamic_thread_pool.h +++ b/src/cpp/server/dynamic_thread_pool.h @@ -19,10 +19,12 @@ #ifndef GRPC_INTERNAL_CPP_DYNAMIC_THREAD_POOL_H #define GRPC_INTERNAL_CPP_DYNAMIC_THREAD_POOL_H -#include #include +#include #include +#include + #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/thd.h" #include "src/cpp/server/thread_pool_interface.h" diff --git a/src/cpp/server/external_connection_acceptor_impl.cc b/src/cpp/server/external_connection_acceptor_impl.cc index 2be1a9f18d1..1b0c68ffcbd 100644 --- a/src/cpp/server/external_connection_acceptor_impl.cc +++ b/src/cpp/server/external_connection_acceptor_impl.cc @@ -19,11 +19,8 @@ #include "src/cpp/server/external_connection_acceptor_impl.h" #include -#include -#include #include -#include #include namespace grpc { diff --git a/src/cpp/server/external_connection_acceptor_impl.h b/src/cpp/server/external_connection_acceptor_impl.h index e7c1fd8857c..674baff55a2 100644 --- a/src/cpp/server/external_connection_acceptor_impl.h +++ b/src/cpp/server/external_connection_acceptor_impl.h @@ -20,12 +20,11 @@ #define SRC_CPP_SERVER_EXTERNAL_CONNECTION_ACCEPTOR_IMPL_H_ #include -#include +#include #include #include #include -#include #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/tcp_server.h" diff --git a/src/cpp/server/health/default_health_check_service.cc b/src/cpp/server/health/default_health_check_service.cc index 55226a7703c..2bc64c26b58 100644 --- a/src/cpp/server/health/default_health_check_service.cc +++ b/src/cpp/server/health/default_health_check_service.cc @@ -18,22 +18,15 @@ #include "src/cpp/server/health/default_health_check_service.h" -#include - #include -#include #include "absl/memory/memory.h" -#include "upb/upb.h" #include "upb/upb.hpp" #include +#include #include -#include -#include -#include -#include -#include +#include #include "src/proto/grpc/health/v1/health.upb.h" diff --git a/src/cpp/server/health/default_health_check_service.h b/src/cpp/server/health/default_health_check_service.h index 449134b0a2b..a58338cbff4 100644 --- a/src/cpp/server/health/default_health_check_service.h +++ b/src/cpp/server/health/default_health_check_service.h @@ -19,22 +19,15 @@ #ifndef GRPC_INTERNAL_CPP_SERVER_DEFAULT_HEALTH_CHECK_SERVICE_H #define GRPC_INTERNAL_CPP_SERVER_DEFAULT_HEALTH_CHECK_SERVICE_H -#include - -#include -#include -#include - -#include "absl/base/thread_annotations.h" +#include +#include #include #include +#include +#include #include -#include #include -#include -#include -#include #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" diff --git a/src/cpp/server/health/health_check_service_server_builder_option.cc b/src/cpp/server/health/health_check_service_server_builder_option.cc index bd32c327904..3fa384ace9e 100644 --- a/src/cpp/server/health/health_check_service_server_builder_option.cc +++ b/src/cpp/server/health/health_check_service_server_builder_option.cc @@ -16,14 +16,7 @@ * */ -#include -#include -#include - #include -#include -#include -#include namespace grpc { diff --git a/src/cpp/server/insecure_server_credentials.cc b/src/cpp/server/insecure_server_credentials.cc index 0c89d409adc..bafd60ded8b 100644 --- a/src/cpp/server/insecure_server_credentials.cc +++ b/src/cpp/server/insecure_server_credentials.cc @@ -16,16 +16,10 @@ * */ -#include -#include - #include #include -#include #include -#include #include -#include namespace grpc { namespace { diff --git a/src/cpp/server/load_reporter/constants.h b/src/cpp/server/load_reporter/constants.h index dab1d7c54a0..dc9fadeab0a 100644 --- a/src/cpp/server/load_reporter/constants.h +++ b/src/cpp/server/load_reporter/constants.h @@ -22,7 +22,6 @@ #include #include -#include namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/get_cpu_stats.h b/src/cpp/server/load_reporter/get_cpu_stats.h index a037c35952e..f514b0752f7 100644 --- a/src/cpp/server/load_reporter/get_cpu_stats.h +++ b/src/cpp/server/load_reporter/get_cpu_stats.h @@ -21,8 +21,6 @@ #include -#include - #include namespace grpc { diff --git a/src/cpp/server/load_reporter/get_cpu_stats_linux.cc b/src/cpp/server/load_reporter/get_cpu_stats_linux.cc index f5fdbf865b5..f778b137855 100644 --- a/src/cpp/server/load_reporter/get_cpu_stats_linux.cc +++ b/src/cpp/server/load_reporter/get_cpu_stats_linux.cc @@ -18,8 +18,6 @@ #include -#include - #ifdef GPR_LINUX #include diff --git a/src/cpp/server/load_reporter/load_data_store.cc b/src/cpp/server/load_reporter/load_data_store.cc index a5a0c027994..9a65c3e78ba 100644 --- a/src/cpp/server/load_reporter/load_data_store.cc +++ b/src/cpp/server/load_reporter/load_data_store.cc @@ -20,18 +20,14 @@ #include "src/cpp/server/load_reporter/load_data_store.h" -#include #include #include -#include #include #include - -#include +#include #include "src/core/lib/iomgr/socket_utils.h" -#include "src/cpp/server/load_reporter/constants.h" namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/load_data_store.h b/src/cpp/server/load_reporter/load_data_store.h index 1f0681800ed..658b1526a5e 100644 --- a/src/cpp/server/load_reporter/load_data_store.h +++ b/src/cpp/server/load_reporter/load_data_store.h @@ -21,17 +21,14 @@ #include -#include -#include - -#include #include #include -#include #include -#include -#include +#include +#include + +#include "src/cpp/server/load_reporter/constants.h" namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/load_reporter.cc b/src/cpp/server/load_reporter/load_reporter.cc index f5dd9582648..c4ea44e51af 100644 --- a/src/cpp/server/load_reporter/load_reporter.cc +++ b/src/cpp/server/load_reporter/load_reporter.cc @@ -25,18 +25,12 @@ #include #include -#include +#include #include -#include -#include - -#include #include "opencensus/stats/internal/set_aggregation_window.h" #include "opencensus/tags/tag_key.h" -#include - #include "src/cpp/server/load_reporter/constants.h" #include "src/cpp/server/load_reporter/get_cpu_stats.h" diff --git a/src/cpp/server/load_reporter/load_reporter.h b/src/cpp/server/load_reporter/load_reporter.h index 380ed37c53e..586e62db07a 100644 --- a/src/cpp/server/load_reporter/load_reporter.h +++ b/src/cpp/server/load_reporter/load_reporter.h @@ -21,29 +21,20 @@ #include -#include -#include - #include #include -#include #include -#include -#include -#include -#include #include -#include - #include "opencensus/stats/stats.h" #include "opencensus/tags/tag_key.h" -#include +#include +#include #include "src/core/lib/gprpp/sync.h" #include "src/cpp/server/load_reporter/load_data_store.h" -#include "src/proto/grpc/lb/v1/load_reporter.pb.h" +#include "src/proto/grpc/lb/v1/load_reporter.grpc.pb.h" namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc b/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc index 05d7f033f81..21164173ac2 100644 --- a/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc +++ b/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc @@ -22,17 +22,8 @@ #include -#include -#include - #include "absl/memory/memory.h" -#include -#include -#include - -#include "src/cpp/server/load_reporter/constants.h" - namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/load_reporter_async_service_impl.h b/src/cpp/server/load_reporter/load_reporter_async_service_impl.h index 5a3f79a80e1..728a193af3d 100644 --- a/src/cpp/server/load_reporter/load_reporter_async_service_impl.h +++ b/src/cpp/server/load_reporter/load_reporter_async_service_impl.h @@ -21,25 +21,13 @@ #include -#include - -#include -#include -#include -#include -#include - #include #include #include -#include -#include #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/thd.h" #include "src/cpp/server/load_reporter/load_reporter.h" -#include "src/proto/grpc/lb/v1/load_reporter.grpc.pb.h" -#include "src/proto/grpc/lb/v1/load_reporter.pb.h" namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc b/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc index bdb99664aaa..29041c9ffa2 100644 --- a/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc +++ b/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc @@ -18,14 +18,7 @@ #include -#include -#include -#include - -#include #include -#include -#include #include "src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h" diff --git a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc index cea1b8eced5..aa0ac19ff7d 100644 --- a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc +++ b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc @@ -20,10 +20,7 @@ #include "src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h" -#include - #include -#include namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h index 30c4e1bf2a8..22b8a72ff49 100644 --- a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h +++ b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h @@ -21,14 +21,7 @@ #include -#include -#include - -#include #include -#include -#include -#include #include "src/cpp/server/load_reporter/load_reporter_async_service_impl.h" diff --git a/src/cpp/server/load_reporter/util.cc b/src/cpp/server/load_reporter/util.cc index 475408a00b2..75be7f16174 100644 --- a/src/cpp/server/load_reporter/util.cc +++ b/src/cpp/server/load_reporter/util.cc @@ -18,16 +18,10 @@ #include -#include - #include -#include -#include #include #include -#include -#include namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/orca/orca_service.cc b/src/cpp/server/orca/orca_service.cc index 30856eca866..ff76427575d 100644 --- a/src/cpp/server/orca/orca_service.cc +++ b/src/cpp/server/orca/orca_service.cc @@ -14,41 +14,16 @@ // limitations under the License. // -#include - -#include -#include -#include - -#include "absl/base/thread_annotations.h" -#include "absl/time/time.h" -#include "absl/types/optional.h" #include "google/protobuf/duration.upb.h" -#include "upb/upb.h" #include "upb/upb.hpp" #include "xds/data/orca/v3/orca_load_report.upb.h" #include "xds/service/orca/v3/orca.upb.h" -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/iomgr/closure.h" -#include "src/core/lib/iomgr/error.h" -#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/timer.h" namespace grpc { diff --git a/src/cpp/server/secure_server_credentials.cc b/src/cpp/server/secure_server_credentials.cc index ab20ec305df..412b7931fc4 100644 --- a/src/cpp/server/secure_server_credentials.cc +++ b/src/cpp/server/secure_server_credentials.cc @@ -18,20 +18,13 @@ #include "src/cpp/server/secure_server_credentials.h" -#include +#include #include #include -#include -#include -#include -#include -#include +#include +#include #include -#include -#include -#include -#include #include "src/cpp/common/secure_auth_context.h" diff --git a/src/cpp/server/secure_server_credentials.h b/src/cpp/server/secure_server_credentials.h index 620e7c76a16..6a74fd9a487 100644 --- a/src/cpp/server/secure_server_credentials.h +++ b/src/cpp/server/secure_server_credentials.h @@ -19,17 +19,11 @@ #ifndef GRPC_INTERNAL_CPP_SERVER_SECURE_SERVER_CREDENTIALS_H #define GRPC_INTERNAL_CPP_SERVER_SECURE_SERVER_CREDENTIALS_H -#include - #include -#include -#include #include -#include -#include #include -#include +#include #include "src/cpp/server/thread_pool_interface.h" diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 2d6de7d6903..f0fec7481a8 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -16,42 +16,20 @@ * */ -// IWYU pragma: no_include - -#include -#include -#include - -#include -#include -#include #include -#include -#include -#include -#include +#include #include -#include -#include -#include -#include -#include -#include #include #include -#include -#include #include #include -#include -#include -#include -#include +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/useful.h" #include "src/cpp/server/external_connection_acceptor_impl.h" +#include "src/cpp/server/thread_pool_interface.h" namespace grpc { diff --git a/src/cpp/server/server_callback.cc b/src/cpp/server/server_callback.cc index e62052b36f6..5b2d328b81b 100644 --- a/src/cpp/server/server_callback.cc +++ b/src/cpp/server/server_callback.cc @@ -16,10 +16,8 @@ */ #include -#include #include "src/core/lib/iomgr/closure.h" -#include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/executor.h" diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc index 6e0f42a2fbf..7d3a62f62bd 100644 --- a/src/cpp/server/server_cc.cc +++ b/src/cpp/server/server_cc.cc @@ -15,68 +15,40 @@ * */ -#include -#include - -#include -#include #include -#include -#include #include -#include #include #include -#include #include "absl/memory/memory.h" -#include #include -#include #include -#include +#include #include -#include -#include -#include #include #include -#include -#include -#include -#include +#include +#include +#include #include -#include -#include -#include -#include -#include +#include +#include #include -#include #include #include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include "src/core/ext/transport/inproc/inproc_transport.h" #include "src/core/lib/gprpp/manual_constructor.h" -#include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/profiling/timers.h" -#include "src/core/lib/resource_quota/api.h" +#include "src/core/lib/surface/call.h" #include "src/core/lib/surface/completion_queue.h" #include "src/core/lib/surface/server.h" #include "src/cpp/client/create_channel_internal.h" diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index 588227431f9..6bfe19d46ad 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -16,44 +16,25 @@ * */ -#include - +#include #include -#include -#include -#include -#include -#include #include -#include #include #include -#include -#include -#include #include -#include #include #include -#include -#include #include -#include -#include -#include -#include -#include -#include +#include +#include #include -#include -#include -#include #include -#include +#include #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/sync.h" +#include "src/core/lib/surface/call.h" namespace grpc { diff --git a/src/cpp/server/server_posix.cc b/src/cpp/server/server_posix.cc index 01c75c25cd7..5854242176a 100644 --- a/src/cpp/server/server_posix.cc +++ b/src/cpp/server/server_posix.cc @@ -16,10 +16,8 @@ * */ -#include #include #include -#include #include namespace grpc { diff --git a/src/cpp/server/xds_server_credentials.cc b/src/cpp/server/xds_server_credentials.cc index 329052488c0..f1842389066 100644 --- a/src/cpp/server/xds_server_credentials.cc +++ b/src/cpp/server/xds_server_credentials.cc @@ -16,13 +16,6 @@ // // -#include - -#include -#include -#include -#include - #include "src/cpp/server/secure_server_credentials.h" namespace grpc { diff --git a/src/cpp/thread_manager/thread_manager.cc b/src/cpp/thread_manager/thread_manager.cc index d6144f94094..25c065588ee 100644 --- a/src/cpp/thread_manager/thread_manager.cc +++ b/src/cpp/thread_manager/thread_manager.cc @@ -18,15 +18,12 @@ #include "src/cpp/thread_manager/thread_manager.h" -#include - #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/thd.h" -#include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/lib/iomgr/exec_ctx.h" namespace grpc { diff --git a/src/cpp/thread_manager/thread_manager.h b/src/cpp/thread_manager/thread_manager.h index b2bbba7c6ee..4c49854d32e 100644 --- a/src/cpp/thread_manager/thread_manager.h +++ b/src/cpp/thread_manager/thread_manager.h @@ -20,11 +20,14 @@ #define GRPC_INTERNAL_CPP_THREAD_MANAGER_H #include +#include + +#include +#include #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/resource_quota/api.h" -#include "src/core/lib/resource_quota/thread_quota.h" namespace grpc { diff --git a/src/cpp/util/byte_buffer_cc.cc b/src/cpp/util/byte_buffer_cc.cc index 3ed178b5dbf..5c6f22bd7c6 100644 --- a/src/cpp/util/byte_buffer_cc.cc +++ b/src/cpp/util/byte_buffer_cc.cc @@ -16,18 +16,10 @@ * */ -#include - #include #include -#include -#include -#include #include #include -#include -#include -#include namespace grpc { diff --git a/src/cpp/util/core_stats.cc b/src/cpp/util/core_stats.cc index 5d94b07da83..edf0b1bb678 100644 --- a/src/cpp/util/core_stats.cc +++ b/src/cpp/util/core_stats.cc @@ -18,17 +18,8 @@ #include "src/cpp/util/core_stats.h" -#include - -#include - -#include - -#include #include -#include "src/core/lib/debug/stats_data.h" - using grpc::core::Bucket; using grpc::core::Histogram; using grpc::core::Metric; diff --git a/src/cpp/util/status.cc b/src/cpp/util/status.cc index 3c029f1c289..93696d81268 100644 --- a/src/cpp/util/status.cc +++ b/src/cpp/util/status.cc @@ -17,7 +17,6 @@ */ #include -#include namespace grpc { diff --git a/src/cpp/util/string_ref.cc b/src/cpp/util/string_ref.cc index 35348d6138a..8b09a82a634 100644 --- a/src/cpp/util/string_ref.cc +++ b/src/cpp/util/string_ref.cc @@ -16,8 +16,6 @@ * */ -#include - #include namespace grpc { diff --git a/src/cpp/util/time_cc.cc b/src/cpp/util/time_cc.cc index 62ee375896c..6c9c228d7cd 100644 --- a/src/cpp/util/time_cc.cc +++ b/src/cpp/util/time_cc.cc @@ -16,15 +16,10 @@ * */ -#include -#include - -#include #include +#include #include -// IWYU pragma: no_include - using std::chrono::duration_cast; using std::chrono::high_resolution_clock; using std::chrono::nanoseconds; diff --git a/templates/src/cpp/common/version_cc.cc.template b/templates/src/cpp/common/version_cc.cc.template index 5fcf6e44174..5c14ffd0a22 100644 --- a/templates/src/cpp/common/version_cc.cc.template +++ b/templates/src/cpp/common/version_cc.cc.template @@ -19,12 +19,9 @@ */ /* This file is autogenerated from: - templates/src/cpp/common/version_cc.cc.template */ + templates/src/core/surface/version.c.template */ - #include - #include - #include namespace grpc { std::string Version() { return "${settings.cpp_version}"; } diff --git a/test/cpp/microbenchmarks/bm_opencensus_plugin.cc b/test/cpp/microbenchmarks/bm_opencensus_plugin.cc index e5636a9b71e..611f9983708 100644 --- a/test/cpp/microbenchmarks/bm_opencensus_plugin.cc +++ b/test/cpp/microbenchmarks/bm_opencensus_plugin.cc @@ -27,7 +27,6 @@ #include #include -#include #include "src/core/lib/config/core_configuration.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" diff --git a/test/cpp/server/load_reporter/load_data_store_test.cc b/test/cpp/server/load_reporter/load_data_store_test.cc index 02d5e82f32e..72a31df98a6 100644 --- a/test/cpp/server/load_reporter/load_data_store_test.cc +++ b/test/cpp/server/load_reporter/load_data_store_test.cc @@ -27,7 +27,6 @@ #include -#include "src/cpp/server/load_reporter/constants.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/tools/dockerfile/grpc_iwyu/iwyu.sh b/tools/dockerfile/grpc_iwyu/iwyu.sh index 1730c8737a3..c5d66259685 100755 --- a/tools/dockerfile/grpc_iwyu/iwyu.sh +++ b/tools/dockerfile/grpc_iwyu/iwyu.sh @@ -54,28 +54,26 @@ export ENABLED_MODULES=' src/core/lib/surface src/core/lib/transport src/core/lib/uri - src/cpp ' export INCLUSION_REGEX=`echo $ENABLED_MODULES | sed 's/ /|/g' | sed 's,\\(.*\\),^(\\1)/,g'` # figure out which files to include -cat compile_commands.json | jq -r '.[].file' \ - | grep -E $INCLUSION_REGEX \ +cat compile_commands.json | jq -r '.[].file' \ + | grep -E $INCLUSION_REGEX \ | grep -v -E "/upb-generated/|/upbdefs-generated/" \ - | sort \ + | sort \ > iwyu_files0.txt -cat iwyu_files0.txt \ +cat iwyu_files0.txt \ | xargs -d '\n' ls -1df 2> /dev/null \ - > iwyu_files.txt \ + > iwyu_files.txt \ || true echo '#!/bin/sh -${IWYU_ROOT}/iwyu/iwyu_tool.py -p compile_commands_for_iwyu.json $1 \ - -- -Xiwyu --no_fwd_decls -Xiwyu --update_comments \ - | grep -v -E "port_platform.h" \ - | grep -v -E "^(- )?namespace " \ +${IWYU_ROOT}/iwyu/iwyu_tool.py -p compile_commands_for_iwyu.json $1 -- -Xiwyu --no_fwd_decls \ + | grep -v -E "port_platform.h" \ + | grep -v -E "^(- )?namespace " \ > iwyu/iwyu.`echo $1 | sha1sum`.out ' > iwyu/run_iwyu_on.sh chmod +x iwyu/run_iwyu_on.sh @@ -86,8 +84,4 @@ xargs -n 1 -P $CPU_COUNT -a iwyu_files.txt ${IWYU_ROOT}/iwyu/run_iwyu_on.sh cat iwyu/iwyu.*.out > iwyu.out # apply the suggested changes -${IWYU_ROOT}/iwyu/fix_includes.py \ - --nocomments \ - --nosafe_headers \ - --ignore_re='^include/.*' \ - < iwyu.out \ +${IWYU_ROOT}/iwyu/fix_includes.py --nocomments --nosafe_headers < iwyu.out diff --git a/tools/run_tests/sanity/check_bad_dependencies.sh b/tools/run_tests/sanity/check_bad_dependencies.sh index 8883d928c99..fa88af2d1a7 100755 --- a/tools/run_tests/sanity/check_bad_dependencies.sh +++ b/tools/run_tests/sanity/check_bad_dependencies.sh @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -ex +set -e # Make sure that there is no path from known unsecure libraries and targets # to an SSL library. Any failure among these will make the script fail.