grpc/include/grpcpp/impl/codegen
Jan Tattermusch 0f1afec5a8
[protobuf] Upgrade third_party/protobuf to 22.x (#32606)
The very non-trivial upgrade of third_party/protobuf to 22.x
This PR strives to be as small as possible and many changes that were
compatible with protobuf 21.x and didn't have to be merged atomically
with the upgrade were already merged.
Due to the complexity of the upgrade, this PR wasn't created
automatically by a tool, but manually. Subsequent upgraded of
third_party/protobuf with our OSS release script should work again once
this change is merged.

This is best reviewed commit-by-commit, I tried to group changes in
logical areas.

Notable changes:
- the upgrade of third_party/protobuf submodule, the bazel protobuf
dependency itself
- upgrade of UPB dependency to 22.x (in the past, we used to always
upgrade upb to "main", but upb now has release branch as well). UPB
needs to be upgraded atomically with protobuf since there's a de-facto
circular dependency (new protobuf depends on new upb, which depends on
new protobuf for codegen).
- some protobuf and upb bazel rules are now aliases, so `
extract_metadata_from_bazel_xml.py` and `gen_upb_api_from_bazel_xml.py`
had to be modified to be able to follow aliases and reach the actual
aliased targets.
- some protobuf public headers were renamed, so especially
`src/compiler` needed to be updated to use the new headers.
- protobuf and upb now both depend on utf8_range project, so since we
bundle upb with grpc in some languages, we now have to bundle utf8_range
as well (hence changes in build for python, PHP, objC, cmake etc).
- protoc now depends on absl and utf8_range (previously protobuf had
absl dependency, but not for the codegen part), so python's
make_grpcio_tools.py required partial rewrite to be able to handle those
dependencies in the grpcio_tools build.
- many updates and fixes required for C++ distribtests (currently they
all pass, but we'll probably need to follow up, make protobuf's and
grpc's handling of dependencies more aligned and revisit the
distribtests)
- bunch of other changes mostly due to overhaul of protobuf's and upb's
internal build layout.

TODOs:
- [DONE] make sure IWYU and clang_tidy_code pass
- create a list of followups (e.g. work to reenable the few tests I had
to disable and to remove workaround I had to use)
- [DONE in cl/523706129] figure out problem(s) with internal import

---------

Co-authored-by: Craig Tiller <ctiller@google.com>
2023-04-12 18:43:58 +02:00
..
security Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
README.md Justify existence of this directory 2020-08-17 11:42:36 -07:00
async_generic_service.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
async_stream.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
async_unary_call.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
byte_buffer.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
call.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
call_hook.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
call_op_set.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
call_op_set_interface.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
callback_common.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
channel_interface.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
client_callback.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
client_context.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
client_interceptor.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
client_unary_call.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
completion_queue.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
completion_queue_tag.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
config.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
config_protobuf.h [protobuf] Upgrade third_party/protobuf to 22.x (#32606) 2023-04-12 18:43:58 +02:00
create_auth_context.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
delegating_channel.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
intercepted_channel.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
interceptor.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
interceptor_common.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
message_allocator.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
metadata_map.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
method_handler.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
method_handler_impl.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
proto_buffer_reader.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
proto_buffer_writer.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
proto_utils.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
rpc_method.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
rpc_service_method.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
serialization_traits.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
server_callback.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
server_callback_handlers.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
server_context.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
server_interceptor.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
server_interface.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
service_type.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
slice.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
status.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
status_code_enum.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
string_ref.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
stub_options.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
sync.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
sync_stream.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00
time.h Convert c-style comments to C++-style comments (#31923) 2022-12-22 23:01:53 -08:00

README.md

Welcome to include/grpcpp/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. 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).