Commit Graph

49 Commits

Author SHA1 Message Date
Esun Kim a3dae00f89
[Deps] Upgrade Protobuf to v23.1 (#33164)
Along with the required Abseil & upb upgrade.
2023-05-18 14:46:59 -07:00
Esun Kim dc95133140
[Deps] Upgrade Protobuf v23 (#32914)
Upgrading Protobuf and Upb to v23.0
2023-05-09 12:24:21 -07:00
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
Esun Kim 27509c345c
Update upb to 20220621 (#30156)
* Update third_party/upb to e4635f223e7d36dfbea3b722a4ca4807a7e882e2

* Update grpc_deps

* Update src/upb/gen_build_yaml.py

* Regen projects

* Gen_upb_api

* Fix missing json files

* Fix missing textformat

* Fix missing upb/arena

* Sanitize

* Fix missing port_def

* Fix missing array.h
2022-07-01 13:57:56 -07:00
Ara Nguyen f3fc1d4d75
use constraints value in @platforms instead of @bazel_tools//platforms https://github.com/bazelbuild/bazel/issues/8622 (#29842) 2022-06-07 12:40:54 -07:00
Esun Kim 83e8f5f0ba
Workaround for the unaligned malloc (#29380) 2022-04-12 16:25:34 -07:00
Esun Kim 696e4928e6
Upgrade upb to the latest (#29333)
* Update upb manual

* Update third_party/upb to bef53686ec702607971bd3ea4d4fefd80c6cc6e8

* Update grpc_deps.bzl

* Update doc

* Regen UPB

* Update by review

* New upb files
2022-04-07 10:28:16 -07:00
Esun Kim c08eb4fc41
Attempt to upgrade upb to the latest (#28685)
* Update upb to 85e5c76cb7098d3ae35e575d652a40568013a149

* Update grpc_deps.bzl

* Run gen_upb_api.sh

* Run run_sed.sh

* Update gen_build_yaml.py

* Regen projects

* Reformat

* Update third_party/upb to 950cdab42fe4c83f06a2be46eeb46a068e486eed

* Update third_party/upb to c9c31241bc39922b092a81d192badd50cccaaa81

* Update src/upb/gen_build_yaml.py

* Generated projects

* Update third_party/upb to a02d92e0257a35f11d4a58b6a932506cbdbb2f29

* Patching in https://github.com/protocolbuffers/upb/pull/524

* Sed script went too far.

Co-authored-by: Nicolas 'Pixel' Noble <nicolas@nobis-crew.org>
2022-02-28 09:26:31 -08:00
Esun Kim 2fd63f2f81
Upgrade upb to 0e0de7d9 (#27984)
* Remove upb first

* Squashed 'third_party/upb/' content from commit 0e0de7d9f9

git-subtree-dir: third_party/upb
git-subtree-split: 0e0de7d9f927aa888d9a0baeaf6576bbbb23bf0b

* Update bazel deps

* Regen upb files

* Fix build
2021-11-15 14:44:35 -08:00
donnadionne f9a2a7401a
Upgrade third_party/protobuf to v3.17.3 (#27227)
* update protobuf dependency

* version changes and generated files

* updating upb to use the latest proto and regen files
2021-09-05 22:21:37 -07:00
Esun Kim 7ccb55ea73
Upb upgrade to the lastest (#26869)
* Squashed 'third_party/upb/' changes from 60607da72e..2de300726a

2de300726a Merge pull request #401 from philwo/patch-1
0010bd88ff Merge pull request #403 from haberman/google-wyhash
3f7ecfe315 A few fixes in the 32-bit fallback.
2c14e2788d Added #include for Windows instrinsic.
9e618009ec Removed some extraneous whitespace.
c4744c0b21 Updated generated files.
039975556d Merge branch 'master' into google-wyhash
ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark
c2f2e93990 Fix Bazel at 4.1.0
41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream.
91d506ac32 Ported ABSL's wyhash to C.
3328f06117 Remove ubuntu1604 from presubmit.yml
f925acf5f0 Merge pull request #400 from haberman/extreg
897bd2500a Fixed compile error.
6e53de4a03 Addressed PR comments.
cdd6434a31 Introduced upb_extreg and plumbed it into decoder.
69f186bd75 Merge pull request #399 from haberman/msg-extrep
3f8aa6ef20 Define the extension representation in messages and mini-tables.
4ccfab154b Merge pull request #398 from haberman/field-mode
58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label."
7596fa740f Merge pull request #397 from haberman/codegen-refactor
fa4dfc2baa Addressed PR comments.
0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions.
52be845c39 Merge pull request #396 from haberman/pre-ext-opt
807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen.
2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant.
6394894b6e Addressed PR comments.
65d7b8ab0c Optimized decoder and paved the way for parsing extensions.
3e035cb553 Merge pull request #395 from haberman/locale
e8ba2a1899 Added a fix for locales that output ',' as decimal separator.
7010a73828 Merge pull request #394 from haberman/file-uniqueness
9482957425 Enforce that filenames are unique when loaded into symtab.
aaad7801bf Merge pull request #393 from haberman/has-attribute
7887dc0c76 Fixed the __has_attribute() check for old versions of Clang.
01e7436ed3 Merge pull request #390 from haberman/musttail
4132034634 Addressed PR comment.
ed708fcd5d Addressed PR comments.
876abae2db Removed some debug printing and simplified checktag slightly.
286441afa7 Fixed a size regression due to inlining UTF-8 verification.
75df4cdaa3 Loosened the check for fasttable to match what we did before.
e84793dd73 Cleaned up debugging artifacts.
a4b35aa388 Everything passes except 4 conformance tests.
6e10b5789d Removed redundant license from port_def in amalgmation.
4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks.
0723bfa700 Merge pull request #387 from haberman/json-null
dda5416569 Update bazel-skylib main branch name.
2fa52e6951 Merge branch 'master' into json-null
a3126b7c7e Merge pull request #388 from haberman/fix-macos
b344a6c582 Fixed the macOS build for XCode 11.3.
a778f2639a Only perform multiple oneof check for non-null fields.
42bdfcb849 Fix BUILD file.
75d6dab37a Merge pull request #384 from haberman/internal
3881393907 Renamed .int.h to _internal.h, for greater clarity.
5084cbe646 Merge pull request #383 from fowles/master
da4b75b979 Fix build rules for more restrive deps checks
a8f9cf54cf Merge pull request #382 from haberman/license-headers
1ba446ccfe Updated Google, Inc. to Google LLC.
823eb09694 Update all 2011 dates to 2021.
ff89277ef0 Merge pull request #380 from fowles/master
5f74d43cf9 Re-add some comment text that was accidentally removed.
0f27b0450a Merge branch 'master' into license-headers
e59d2c8fa7 Added license headers to all files.
be4f64b926 Merge pull request #381 from haberman/mv-msg-public
1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h.
6481f6319e Spell out deps explicitly
f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem
3c3799498d Merge pull request #379 from fowles/master
2e83d5c98f Remove unused file test_util.h
b053fa6991 Merge pull request #378 from fowles/master
7876639e50 remove unused macro
5b97df91dd Restrict fuse to matching block_alloc
e74d6c23de Small renames and use uintptr_t instead of void*
d9a0c58108 Allow arena fuse to fail
53f5d9f69b Merge pull request #377 from haberman/json-parse-null
8370818143 Switch to a macro to avoid signed/const mismatches.
63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder.
add9b12f18 Fixed quadratic memory usage in upb_array_append().
97e2aeb7ee Merge pull request #375 from haberman/cleanups
83c0edbd2a A few minor cleanups.
baa7fe7473 Merge pull request #374 from haberman/update-deps
900bd5c426 Merge pull request #355 from haberman/aarch64
89df647460 Updated versions of ABSL and protobuf deps.
e4343f0fa3 Update comment for ARM64.
103d51f102 Merge branch 'master' into aarch64
1b9cc09f0e Removed extraneous copybara directive.
bbd817fdb6 Merge pull request #373 from haberman/table-cleanup
c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively.
ed5b4108e0 Merge pull request #363 from haberman/delete-handlers
bfa528f0ae Merge pull request #372 from haberman/errmsg-fix
ec9ba3f893 Fixed error message buffer overflow.
eb0fdda14b Merge pull request #371 from haberman/json-any
e58f7a0284 Fix for Any messages with no fields.
7541ba0f38 Merge pull request #364 from catenacyber/cifuzz
81829bacc3 Removed quote chars from error message.
88ed8f5d3b Changed JSON decoding error message to be more clear.
f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use.
b080659eee Merge pull request #367 from haberman/timestamp-minute-offset
f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON.
451dcbbb9a Adds CIFuzz
f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name.
0f40d59258 Merge pull request #362 from haberman/rb-warnings
c7787cbaa1 Fixed a bunch of Clang warnings.
5e53b5bb3d Merge pull request #360 from haberman/default-msgval
7a6e647be1 Merge branch 'master' into default-msgval
edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix
9175989431 Bugfix for arena cleanup list when passing to upb_decode().
5e550e88f8 Added API for getting fielddef default as a upb_msgval.
de76b31f9c Merge pull request #359 from veblush/fix-upbdefs
3cab8a38fc Fixed upbdefs error
48bb3e5662 Merge pull request #357 from veblush/string-opt
4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix
38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names
9b020d8f65 Optimize calls to std::string::find() and friends for a single char.
3c9ae7837a The fasttable parser works on ARM64!

git-subtree-dir: third_party/upb
git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f

* Updated upb for bazel

* Regen upb files

* Updated src/upb/gen_build_yaml.py
2021-08-06 10:30:53 -07:00
Esun Kim 603e6201e5 Upgrade upb to 60607da 2020-12-21 09:56:02 -08:00
Esun Kim 3eaa178894 Merge commit '6d7d35fa3968f00bc252e5314b962a9a3b44c67f' into upb-upgrade 2020-08-03 14:26:43 -07:00
Mark D. Roth 78326c5631 Merge commit 'b48f821048df6009f1f8fc99fba104d428554b2f' into upb_upgrade 2020-06-11 13:00:33 -07:00
Mark D. Roth e5c40499ab Merge commit 'c6d2315315a77b62a9d6add8414aeda81641d37c' into upb_upgrade 2020-06-04 15:49:38 -07:00
Mark D. Roth ad96003d48 Merge commit 'a7aa78069174194f6a0645ad3a3043b3873bf956' into upb_upgrade 2020-06-04 13:32:45 -07:00
Mark D. Roth 9c7a92cb8f Merge commit 'fae053df229d1f91ad34e9772a9d7343d1d46669' into upb_upgrade 2020-06-03 07:20:44 -07:00
Mark D. Roth fbe57516b1 Merge commit '8e25c7c539676a06ad8406c1ccb8f48e022f3eb2' into upb_upgrade.alt 2020-06-02 14:34:37 -07:00
Mark D. Roth aac96cc097 Merge commit '4df91612df87d4fc96e7cfa3203f4e08a7d13e1b' into upb_upgrade 2020-03-12 09:12:39 -07:00
Mark D. Roth 017a22c520 Merge remote-tracking branch 'upstream/master' into upb_upgrade 2020-03-09 08:07:04 -07:00
Esun Kim ce1c0b8743 Remove upb/BUILD 2020-03-03 14:23:16 -08:00
Mark D. Roth 776ebe35f5 Merge commit '98c364f587935024d0d6cd06ad77394128d4eac5' into upb_upgrade 2020-02-27 09:26:30 -08:00
Mark D. Roth 7f0b8e4b4e Merge commit '7eafc04dde203ad17cb454c64dccbe1468f68cb2' into upb_upgrade 2020-02-21 11:49:53 -08:00
Mark D. Roth 68ba7c2d15 Merge commit '657bcfb5ad7501c1191d070bde98cdd9799c51b2' into upb_upgrade 2020-02-11 09:06:12 -08:00
Mark D. Roth 08069958fc Merge remote-tracking branch 'upstream/master' into upb_upgrade 2020-02-10 14:40:07 -08:00
Mark D. Roth 2e8e75d009 Merge commit '08435c678495c992912f5ec78cf9db8e02df647b' into upb_upgrade 2020-02-10 14:33:12 -08:00
Mark D. Roth 5a49fd5d3d Merge commit '6a2cb9b2f83577b81ca69e23069790b694017973' into upb_upgrade 2020-02-07 10:13:17 -08:00
Mark D. Roth 522b460207 Merge commit '4f76446806ecc7dd4b1d70377fafd3508629196a' into upb_upgrade 2020-02-07 07:46:18 -08:00
Mark D. Roth 1005f99804 Merge commit '31bae1a592817db2a9e69b3ba55160ccb5370af5' into upb_upgrade 2020-02-06 10:20:07 -08:00
Yannic Bonenberger 06ecc87290 [bazel] Add fixes for --incompatible_load_proto_rules_from_bzl 2020-02-05 19:58:30 +01:00
Mark D. Roth a114f0281f Merge commit '6a73cb023670f7be835b3d78197e93f22157a177' into xds_logging 2020-02-04 08:38:08 -08:00
Esun Kim 7e32ac31ca Merge commit 'f9d27c0b8c77ebaa42dd1d287e1ec7d0c3682ad4' into upb-update 2020-01-13 12:53:08 -08:00
Esun Kim 508a20b2e2 Merge commit '01ca25b429b2e9ff2d7e5271367aa545fe3ba62a' into update-upb 2019-12-17 13:06:51 -08:00
Esun Kim b3b691d89e Merge commit 'f6fdae755f77250cc3a68a76c969229ffb81b158' into upb-up 2019-11-19 09:51:20 -08:00
Lidi Zheng c34bef4ca4 Format all Bazel files with buildifier 2019-11-05 14:03:52 -08:00
Esun Kim 3ffed08610 Merge commit '4d88f39d54a2e33119a572bbd2112d2c0ae53145' as 'third_party/upb' 2019-10-17 21:06:18 -07:00
Esun Kim e24cbab32a Remove upb submodule 2019-10-17 20:40:35 -07:00
Esun Kim 300077aac1 Update upb to HEAD 2019-09-10 15:26:33 -07:00
Esun Kim 78a01a5782 Update upb to the latest 2019-08-09 09:12:18 -07:00
Esun Kim f88bd06ee5 Go UPB! 2019-08-06 15:27:14 -07:00
Esun Kim 44de9634f6 Update third_party/upb to the latest 2019-07-26 15:41:29 -07:00
Nicolas "Pixel" Noble a4608cb373 Properly using upb's upstream. 2019-07-24 01:34:08 +02:00
Nicolas "Pixel" Noble 8de64087a3 Clean bazel 0.26 upgrade. 2019-06-14 00:20:29 +02:00
Nicolas "Pixel" Noble 63e2c91efe New version of upb. 2019-06-12 01:32:45 +02:00
Alexander Polcyn 4ba81610ee Revert "Update the upb submodule for proto.oneof fix in generated code."
This reverts commit 2975571fd3.
2019-04-12 12:00:10 -07:00
Vishal Powar 2975571fd3 Update the upb submodule for proto.oneof fix in generated code. 2019-04-11 16:24:58 -07:00
Vishal Powar fb15daf8b9 Add generated upb code for endpoints information.
Also,
  - Update upb submodule for new code generator and update generated
  files.
2019-03-21 17:24:57 -07:00
Vishal Powar 319fcdf26e Add a script for generating C code and build rule for protobuf protos.
All these changes need to go together to make sense
  - changes to use new version of upb in bazel
  - allowing includes in build target option
  - script for generating c code (upb) for protos
  - generated code for example protos
  - adding changes for non-bazel builds
  - change sanity tests to ignore the generated files.
2019-03-13 12:53:17 -07:00
Vishal Powar f614fa5947 Adding upb as submodule
upb will be used for codegen of xDS protos.
2018-11-28 10:09:03 -08:00