Skip to content

Commit

Permalink
Update protobuf to 3.21.2
Browse files Browse the repository at this point in the history
a628f0376085fcf46dc6d24629f2a7dacb91ae79
  • Loading branch information
4JustMe4 committed Jun 30, 2024
1 parent 7ac5a5e commit 36e6255
Show file tree
Hide file tree
Showing 238 changed files with 12,428 additions and 14,078 deletions.
187 changes: 178 additions & 9 deletions contrib/libs/protobuf/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,184 @@
2022-09-13 version 20.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
2022-07-19 version 21.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
C++
* Add header search paths to Protobuf-C++.podspec (#10024)
* Fixed Visual Studio constinit errors (#10232)
* Fix #9947: make the ABI compatible between debug and non-debug builds (#10271)

UPB
* Allow empty package names (fixes behavior regression in 4.21.0)
* Fix a SEGV bug when comparing a non-materialized sub-message (#10208)
* Fix several bugs in descriptor mapping containers (eg. descriptor.services_by_name)
* for x in mapping now yields keys rather than values, to match Python conventions and the behavior of the old library.
* Lookup operations now correctly reject unhashable types as map keys.
* We implement repr() to use the same format as dict.
* Fix maps to use the ScalarMapContainer class when appropriate
* Fix bug when parsing an unknown value in a proto2 enum extension (protocolbuffers/upb#717)

PHP
* Add "readonly" as a keyword for PHP and add previous classnames to descriptor pool (#10041)

Python
* Make //:protobuf_python and //:well_known_types_py_pb2 public (#10118)

Bazel
* Add back a filegroup for :well_known_protos (#10061)

2022-06-27 version 21.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby)
C++
* ArenaString improvements (fix alignment issue)

PHP
* API changes for OneOf (#10102)


2022-05-27 version 21.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

C++
* cmake: Revert "Fix cmake install targets (#9822)" (#10060)
* Remove Abseil dependency from CMake build (#10056)

Python
* Update python wheel metadata with more information incl. required python version (#10058)
* Fix segmentation fault when instantiating field via repeated field assignment (#10066)

2022-05-25 version 21.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

C++
* cmake: Call get_filename_component() with DIRECTORY mode instead of PATH mode (#9614)
* Escape GetObject macro inside protoc-generated code (#9739)
* Update CMake configuration to add a dependency on Abseil (#9793)
* Fix cmake install targets (#9822)
* Use __constinit only in GCC 12.2 and up (#9936)

Java
* Update protobuf_version.bzl to separate protoc and per-language java … (#9900)

Python
* Increment python major version to 4 in version.json for python upb (#9926)
* The C extension module for Python has been rewritten to use the upb library.
This is expected to deliver significant performance benefits, especially when
parsing large payloads. There are some minor breaking changes, but these
should not impact most users. For more information see:
https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
* Fixed win32 build and fixed str(message) on all Windows platforms. (#9976)
* The binary wheel for macOS now supports Apple silicon.

PHP
* [PHP] fix PHP build system (#9571)
* Fix building packaged PHP extension (#9727)
* fix: reserve "ReadOnly" keyword for PHP 8.1 and add compatibility (#9633)
* fix: phpdoc syntax for repeatedfield parameters (#9784)
* fix: phpdoc for repeatedfield (#9783)
* Change enum string name for reserved words (#9780)
* chore: [PHP] fix phpdoc for MapField keys (#9536)
* Fixed PHP SEGV by not writing to shared memory for zend_class_entry. (#9996)

Ruby
* Allow pre-compiled binaries for ruby 3.1.0 (#9566)
* Implement `respond_to?` in RubyMessage (#9677)
* [Ruby] Fix RepeatedField#last, #first inconsistencies (#9722)
* Do not use range based UTF-8 validation in truffleruby (#9769)
* Improve range handling logic of `RepeatedField` (#9799)
* Support x64-mingw-ucrt platform

Other
* [Kotlin] remove redundant public modifiers for compiled code (#9642)
* [C#] Update GetExtension to support getting typed value (#9655)
* Fix invalid dependency manifest when using `descriptor_set_out` (#9647)
* Fix C# generator handling of a field named "none" in a oneof (#9636)
* Add initial version.json file for 21-dev (#9840)
* Remove duplicate java generated code (#9909)
* Cherry-pick PR #9981 into 21.x branch (#10000)


2022-05-19 version 21.0-rc2(C++/Java/Python/PHP/Objective-C/C#/Ruby)

Python
* Fix windows builds
* Throw more helpful error if generated code is out of date
* Fixed two reference leaks

Ruby
* Support x64-mingw-ucrt platform

PHP
* Fix SEGV by not writing to shared memory for zend_class_entry

C#
* Suppress warning CS8981

Other
* Fix Maven release to release actual osx_aarch64 binary
* Fix protoc zips to have the proto files for well known types

2022-05-10 version 21.0-rc1 (C++/Java/Python/PHP/Objective-C/C#/Ruby)

C++
* Rename main cmake/CMakeLists.txt to CMakeLists.txt (#9603)
* avoid allocating memory if all extension are cleared (#9345)
* cmake: Call get_filename_component() with DIRECTORY mode instead of PATH mode (#9614)
* Escape GetObject macro inside protoc-generated code (#9739)
* Update CMake configuration to add a dependency on Abseil (#9793)
* Use __constinit only in GCC 12.2 and up (#9936)
* Refactor generated message class layout
* Optimize tokenizer ParseInteger by removing division
* Reserve exactly the right amount of capacity in ExtensionSet::MergeFrom
* Parse FLT_MAX correctly when represented in JSON

Java
* Update protobuf_version.bzl to separate protoc and per-language java … (#9900)
* 6x speedup in ArrayEncoder.writeUInt32NotTag

Python
* Increment python major version to 4 in version.json for python upb (#9926)
* The C extension module for Python has been rewritten to use the upb library.
This is expected to deliver significant performance benefits, especially when
parsing large payloads. There are some minor breaking changes, but these
should not impact most users. For more information see:
https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
* Due to the breaking changes for Python, the major version number for Python
has been incremented.
* The binary wheel for macOS now supports Apple silicon.

2022-04-05 version 3.20.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

PHP
* chore: [PHP] fix phpdoc for MapField keys (#9536)
* [PHP] Remove unnecessary zval initialization (#9600)
* [PHP] fix PHP build system (#9571)
* Fix building packaged PHP extension (#9727)
* fix: reserve "ReadOnly" keyword for PHP 8.1 and add compatibility (#9633)
* fix: phpdoc syntax for repeatedfield parameters (#9784)
* fix: phpdoc for repeatedfield (#9783)
* Change enum string name for reserved words (#9780)
* Fixed composer.json to only advertise compatibility with PHP 7.0+. (#9819)

Ruby
* Allow pre-compiled binaries for ruby 3.1.0 (#9566)
* Implement `respond_to?` in RubyMessage (#9677)
* [Ruby] Fix RepeatedField#last, #first inconsistencies (#9722)
* Do not use range based UTF-8 validation in truffleruby (#9769)
* Improve range handling logic of `RepeatedField` (#9799)
* Disable the aarch64 build on macOS until it can be fixed. (#9816)

Other
* [Kotlin] remove redundant public modifiers for compiled code (#9642)
* [C#] Update GetExtension to support getting typed value (#9655)
* Fix invalid dependency manifest when using `descriptor_set_out` (#9647)
* Fix C# generator handling of a field named "none" in a oneof (#9636)
* Add initial version.json file for 21-dev (#9840)
* Remove duplicate java generated code (#9909)
* Fix versioning issues in 3.20.0

Compiler
* Protoc outputs the list of suggested field numbers when invalid field
numbers are specified in the .proto file.
* Require package names to be less than 512 bytes in length

2022-04-21 version 3.20.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

PHP
* Fix building packaged PHP extension (#9727)

Other
* Fix versioning issues in 3.20.0

Expand Down Expand Up @@ -963,11 +1132,11 @@ mistakenly tagged at the wrong commit.


2020-02-14 version 3.11.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

C#
* Fix latest ArgumentException for C# extensions (#7188)
* Enforce recursion depth checking for unknown fields (#7210)

Ruby
* Fix wrappers with a zero value (#7195)
* Fix JSON serialization of 0/empty-valued wrapper types (#7198)
Expand All @@ -980,13 +1149,13 @@ mistakenly tagged at the wrong commit.
PHP
* Refactored ulong to zend_ulong for php7.4 compatibility (#7147)
* Call register_class before getClass from desc to fix segfault (#7077)


2019-12-10 version 3.11.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

PHP
* Make c extension portable for php 7.4 (#6968)


2019-12-02 version 3.11.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)

Expand Down Expand Up @@ -1062,7 +1231,7 @@ mistakenly tagged at the wrong commit.
* Support 32 bit values for ProtoStreamObjectWriter to Struct.
* Removed the internal-only header coded_stream_inl.h and the internal-only methods defined there.
* Enforced no SWIG wrapping of descriptor_database.h (other headers already had this restriction).
* Implementation of the equivalent of the MOMI parser for serialization. This removes one of the two serialization routines, by making the fast array serialization routine completely general. SerializeToCodedStream can now be implemented in terms of the much much faster array serialization. The array serialization regresses slightly, but when array serialization is not possible this wins big.
* Implementation of the equivalent of the MOMI parser for serialization. This removes one of the two serialization routines, by making the fast array serialization routine completely general. SerializeToCodedStream can now be implemented in terms of the much much faster array serialization. The array serialization regresses slightly, but when array serialization is not possible this wins big.
* Do not convert unknown field name to snake case to accurately report error.
* Fix a UBSAN warnings. (#6333)
* Add podspec for C++ (#6404)
Expand Down Expand Up @@ -1096,7 +1265,7 @@ mistakenly tagged at the wrong commit.
* Change the parameter types of binaryReaderFn in ExtensionFieldBinaryInfo to (number, ?, ?).
* Create dates.ts and time_of_days.ts to mirror Java versions. This is a near-identical conversion of c.g.type.util.{Dates,TimeOfDays} respectively.
* Migrate moneys to TypeScript.

PHP
* Fix incorrect leap day for Timestamp (#6696)
* Initialize well known type values (#6713)
Expand All @@ -1110,7 +1279,7 @@ mistakenly tagged at the wrong commit.
* Optimization for layout_init() (#6547)
* Fix for GC of Ruby map frames. (#6533)
* Fixed leap year handling by reworking upb_mktime() -> upb_timegm(). (#6695)

Objective C
* Remove OSReadLittle* due to alignment requirements (#6678)
* Don't use unions and instead use memcpy for the type swaps. (#6672)
Expand Down
12 changes: 6 additions & 6 deletions contrib/libs/protobuf/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ conforming.

## Contributing Process

Most pull requests should go to the master branch and the change will be
Most pull requests should go to the main branch and the change will be
included in the next major/minor version release (e.g., 3.6.0 release). If you
need to include a bug fix in a patch release (e.g., 3.5.2), make sure it’s
already merged to master, and then create a pull request cherry-picking the
commits from master branch to the release branch (e.g., branch 3.5.x).
already merged to main, and then create a pull request cherry-picking the
commits from main branch to the release branch (e.g., branch 3.5.x).

For each pull request, a protobuf team member will be assigned to review the
pull request. For minor cleanups, the pull request may be merged right away
Expand Down Expand Up @@ -96,9 +96,9 @@ the final release.
of inactivity.
* Maintain clean commit history and use meaningful commit messages. PRs with
messy commit history are difficult to review and won't be merged. Use rebase
-i upstream/master to curate your commit history and/or to bring in latest
changes from master (but avoid rebasing in the middle of a code review).
* Keep your PR up to date with upstream/master (if there are merge conflicts,
-i upstream/main to curate your commit history and/or to bring in latest
changes from main (but avoid rebasing in the middle of a code review).
* Keep your PR up to date with upstream/main (if there are merge conflicts,
we can't really merge your change).
* All tests need to be passing before your change can be merged. We recommend
you run tests locally before creating your PR to catch breakages early on.
Expand Down
3 changes: 1 addition & 2 deletions contrib/libs/protobuf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ page, check out the maven repo here:
[https://repo1.maven.org/maven2/com/google/protobuf/protoc/](https://repo1.maven.org/maven2/com/google/protobuf/protoc/)

These pre-built binaries are only provided for released versions. If you want
to use the github master version at HEAD, or you need to modify protobuf code,
to use the github main version at HEAD, or you need to modify protobuf code,
or you are using C++, it's recommended to build your own protoc binary from
source.

Expand All @@ -59,7 +59,6 @@ how to install protobuf runtime for that specific language:
| Python | [python](python) |
| Objective-C | [objectivec](objectivec) |
| C# | [csharp](csharp) |
| JavaScript | [js](js) |
| Ruby | [ruby](ruby) |
| Go | [protocolbuffers/protobuf-go](https://github.com/protocolbuffers/protobuf-go)|
| PHP | [php](php) |
Expand Down
4 changes: 4 additions & 0 deletions contrib/libs/protobuf/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ Mac installations.

sudo /opt/local/bin/port install autoconf automake libtool

Alternative for Homebrew users:

brew install autoconf automake libtool

Then follow the Unix instructions above.

**Note for cross-compiling**
Expand Down
4 changes: 2 additions & 2 deletions contrib/libs/protobuf/src/google/protobuf/any.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ class PROTOBUF_EXPORT AnyMetadata {
// *full_type_name. Returns false if the type_url does not have a "/"
// in the type url separating the full type name.
//
// NOTE: this function is available publicly as:
// google::protobuf::Any() // static method on the generated message type.
// NOTE: this function is available publicly as a static method on the
// generated message type: google::protobuf::Any::ParseAnyTypeUrl()
bool ParseAnyTypeUrl(StringPiece type_url, TProtoStringType* full_type_name);

// Get the proto type name and prefix from Any::type_url value. For example,
Expand Down
Loading

0 comments on commit 36e6255

Please sign in to comment.