From 7dd4e786cd793380dfeeee39f30e5a28dce52397 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Fri, 14 Aug 2020 11:28:03 -0700 Subject: [PATCH 1/2] Justify this directory's existence --- include/grpcpp/impl/codegen/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/grpcpp/impl/codegen/README.md diff --git a/include/grpcpp/impl/codegen/README.md b/include/grpcpp/impl/codegen/README.md new file mode 100644 index 00000000000..b3fc3936875 --- /dev/null +++ b/include/grpcpp/impl/codegen/README.md @@ -0,0 +1,18 @@ +# Welcome to `impl/codegen` + +## Why is this directory here? + +This directory exists so that generated code can include selected files upon +which it depends without having to depend on the entire gRPC C++ library. This +is particularly relevant for users of bazel, particularly if they use the +multi-lingual `proto_library` target type. Generated code that uses this target +only depends on the gRPC C++ targets associated with these header files, not the +entire gRPC C++ codebase since that would make the build time of these types of +targets excessively large (particularly when they are not even C++ specific). + +## What should user code do? + +User code should *not* include anything from this directory. Only generated code +and gRPC library code should include contents from this directory. User code +should instead include contents from the main `grpcpp` directory or its +accessible subcomponents like `grpcpp/support`. From 355c7b26d488fff1e4377b3bbd5d22317c078365 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Fri, 14 Aug 2020 11:34:48 -0700 Subject: [PATCH 2/2] Update README.md --- include/grpcpp/impl/codegen/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/grpcpp/impl/codegen/README.md b/include/grpcpp/impl/codegen/README.md index b3fc3936875..b9ab08d5cc3 100644 --- a/include/grpcpp/impl/codegen/README.md +++ b/include/grpcpp/impl/codegen/README.md @@ -15,4 +15,7 @@ targets excessively large (particularly when they are not even C++ specific). User code should *not* include anything from this directory. Only generated code and gRPC library code should include contents from this directory. User code should instead include contents from the main `grpcpp` directory or its -accessible subcomponents like `grpcpp/support`. +accessible subcomponents like `grpcpp/support`. It is possible that we may +remove this directory altogether if the motivations for its existence are no +longer strong enough (e.g., if most users migrate away from the `proto_library` +target type or if the additional overhead of depending on gRPC C++ is not high).