From 8a3c0a8c95ccf2c68d9512d25cbd788c2d64c979 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 17 Aug 2020 10:21:27 -0700 Subject: [PATCH] Justify existence of this directory --- include/grpc/impl/codegen/README.md | 22 ++++++++++++++++++++++ include/grpcpp/impl/codegen/README.md | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 include/grpc/impl/codegen/README.md diff --git a/include/grpc/impl/codegen/README.md b/include/grpc/impl/codegen/README.md new file mode 100644 index 00000000000..1bafd001b6b --- /dev/null +++ b/include/grpc/impl/codegen/README.md @@ -0,0 +1,22 @@ +# Welcome to `include/grpc/impl/codegen` + +## Why is this directory here? + +This directory exists so that generated C++ code can include selected files upon +which it depends without having to depend on the entire gRPC C++ library. This +directory thus exists to support `include/grpcpp/impl/codegen`. This constraint +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. C++ user code +should instead include contents from the main `grpcpp` directory or its +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 the gRPC C++ library no longer has a need for an +`impl/codegen` directory of its own). diff --git a/include/grpcpp/impl/codegen/README.md b/include/grpcpp/impl/codegen/README.md index b9ab08d5cc3..ade9d054842 100644 --- a/include/grpcpp/impl/codegen/README.md +++ b/include/grpcpp/impl/codegen/README.md @@ -1,4 +1,4 @@ -# Welcome to `impl/codegen` +# Welcome to `include/grpcpp/impl/codegen` ## Why is this directory here?