grpc/cmake
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
..
modules Add support for systemd socket activation (#31667) 2023-01-05 14:53:33 -08:00
OWNERS bG6b3V2MNxQ (#30021) 2022-06-21 08:00:32 -07:00
abseil-cpp.cmake Added abseil include cmake guard (#29609) 2022-05-12 08:51:37 -07:00
address_sorting.cmake Put address_sorting's public header under its own directory. Also add 2018-03-20 23:51:23 -07:00
benchmark.cmake add explicit branch for PROVIDER=none 2019-11-20 10:01:14 -05:00
cares.cmake Merge pull request #21411 from zackgalbreath/thirdparty_install 2019-12-13 17:30:48 +01:00
ccache.cmake activate ccache for selected win builds (#28735) 2022-03-10 19:50:34 +01:00
download_archive.cmake [xDS Proto] Enhence gRPC buildgen for 3rd party proto compilation (#29254) 2022-04-13 14:26:08 -07:00
gRPCConfig.cmake.in Cmake add separate export for plugin targets (#31525) 2022-11-15 11:26:29 -08:00
msvc_static_runtime.cmake Fix regression in MSVC runtime flag 2020-01-24 13:23:58 -05:00
pkg-config-template.pc.in Use CMake variables for paths in pkg-config files (#31671) 2023-01-17 12:51:11 -08:00
protobuf.cmake Switch to protobuf's /CMakeLists.txt instead of /cmake/CMakeLists.txt (#32678) 2023-03-22 09:14:04 -07:00
re2.cmake Attempt to find RE2 via CMake and via pkg-config. 2020-09-09 04:26:36 -07:00
ssl.cmake Revert "Revert "Reintroduce #21527 (boringssl submodule unification)"" 2020-01-29 09:18:51 -05:00
systemd.cmake Add support for systemd socket activation (#31667) 2023-01-05 14:53:33 -08:00
upb.cmake [protobuf] Upgrade third_party/protobuf to 22.x (#32606) 2023-04-12 18:43:58 +02:00
xxhash.cmake Adding xxhash as a subtree (#25645) 2021-03-11 09:09:40 -08:00
zlib.cmake Allow gRPC_INSTALL with module providers 2019-12-11 10:16:51 -05:00