Skip to content

Commit

Permalink
[iwyu] c++ (#29721)
Browse files Browse the repository at this point in the history
* Revert "Revert "[iwyu] grpc++ (#29610)" (#29720)"

This reverts commit 0642bc2.

* fixup status_code_enum import issue

* fix

* Automated change: Fix sanity tests

* import fixes

* fix import

Co-authored-by: ctiller <[email protected]>
  • Loading branch information
ctiller and ctiller authored May 19, 2022
1 parent 4d1aa35 commit 0f9d024
Show file tree
Hide file tree
Showing 107 changed files with 894 additions and 166 deletions.
83 changes: 81 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,17 @@ 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,
Expand All @@ -481,6 +492,7 @@ grpc_cc_library(
"protobuf_headers",
],
visibility = ["@grpc:public"],
deps = ["grpc_public_hdrs"],
)

grpc_cc_library(
Expand Down Expand Up @@ -549,11 +561,13 @@ 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",
Expand All @@ -562,6 +576,7 @@ grpc_cc_library(
"json",
"ref_counted_ptr",
"slice",
"slice_refcount",
],
)

Expand Down Expand Up @@ -658,6 +673,8 @@ grpc_cc_library(
],
language = "c++",
deps = [
"gpr",
"grpc",
"grpc++_internals",
],
)
Expand All @@ -676,6 +693,8 @@ grpc_cc_library(
],
visibility = ["@grpc:xds"],
deps = [
"gpr",
"grpc",
"grpc++_internals",
],
)
Expand All @@ -697,6 +716,7 @@ grpc_cc_library(
"grpc++_codegen_base",
"grpc++_codegen_base_src",
"grpc++_codegen_proto",
"grpc_codegen",
"grpc_insecure_credentials",
"grpc_unsecure",
],
Expand Down Expand Up @@ -730,6 +750,7 @@ grpc_cc_library(
"include/grpcpp/security/alts_util.h",
],
external_deps = [
"absl/memory",
"upb_lib",
],
language = "c++",
Expand Down Expand Up @@ -3886,6 +3907,9 @@ 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",
Expand All @@ -3900,10 +3924,15 @@ grpc_cc_library(
hdrs = [
"src/cpp/server/load_reporter/load_reporter_async_service_impl.h",
],
external_deps = ["absl/memory"],
external_deps = [
"absl/memory",
"protobuf_headers",
],
language = "c++",
deps = [
"gpr",
"gpr_codegen",
"grpc++",
"lb_load_reporter",
],
)
Expand Down Expand Up @@ -3938,6 +3967,7 @@ grpc_cc_library(
external_deps = [
"opencensus-stats",
"opencensus-tags",
"protobuf_headers",
],
language = "c++",
deps = [
Expand Down Expand Up @@ -5414,6 +5444,8 @@ grpc_cc_library(
srcs = GRPCXX_SRCS,
hdrs = GRPCXX_HDRS,
external_deps = [
"absl/base:core_headers",
"absl/strings",
"absl/synchronization",
"absl/memory",
"upb_lib",
Expand All @@ -5423,8 +5455,10 @@ 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",
Expand All @@ -5438,6 +5472,10 @@ grpc_cc_library(
"grpc_transport_inproc",
"iomgr_timer",
"ref_counted",
"ref_counted_ptr",
"resource_quota",
"slice",
"time",
"useful",
],
)
Expand All @@ -5447,6 +5485,8 @@ grpc_cc_library(
srcs = GRPCXX_SRCS,
hdrs = GRPCXX_HDRS,
external_deps = [
"absl/base:core_headers",
"absl/strings",
"absl/synchronization",
"absl/memory",
"upb_lib",
Expand All @@ -5457,8 +5497,10 @@ 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",
Expand All @@ -5473,6 +5515,10 @@ grpc_cc_library(
"grpc_unsecure",
"iomgr_timer",
"ref_counted",
"ref_counted_ptr",
"resource_quota",
"slice",
"time",
"useful",
],
)
Expand Down Expand Up @@ -5572,6 +5618,7 @@ grpc_cc_library(
language = "c++",
deps = [
"grpc++_codegen_base",
"grpc++_public_hdrs",
],
)

Expand Down Expand Up @@ -5616,6 +5663,9 @@ 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",
Expand All @@ -5635,6 +5685,9 @@ 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++",
Expand All @@ -5643,12 +5696,15 @@ 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",
Expand All @@ -5665,6 +5721,9 @@ 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",
Expand All @@ -5674,6 +5733,7 @@ grpc_cc_library(
"gpr",
"grpc",
"grpc++",
"grpc++_config_proto",
"//src/proto/grpc/channelz:channelz_proto",
],
alwayslink = 1,
Expand All @@ -5687,7 +5747,10 @@ grpc_cc_library(
hdrs = [
"src/cpp/server/csds/csds.h",
],
external_deps = ["absl/status:statusor"],
external_deps = [
"absl/status",
"absl/status:statusor",
],
language = "c++",
deps = [
"gpr",
Expand Down Expand Up @@ -5762,10 +5825,14 @@ 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",
],
)
Expand Down Expand Up @@ -5796,10 +5863,14 @@ 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",
Expand All @@ -5808,10 +5879,18 @@ 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",
],
)

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

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

5 changes: 5 additions & 0 deletions bazel/grpc_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ 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",
Expand Down
Loading

0 comments on commit 0f9d024

Please sign in to comment.