protobuf v4.0.0-rc2 Release Notes
Release Date: 2020-07-21 // about 4 years ago-
No data yet ๐
You can check the official repo
Previous changes from v4.0.0-rc1
-
Note: This release bumps the major version due to backward-incompatible changes in PHP.
PHP is the only language that has breaking changes in this release.
PHP
- The C extension is completely rewritten. The new C extension has significantly
๐ better parsing performance and fixes a handful of conformance issues. It will
๐ also make it easier to add support for more features like proto2 and proto3 presence. - ๐ The new C extension does not support PHP 5.x, which is the reason for the major
๐ version bump. PHP 5.x users can still use pure-PHP.
C++:
- โ Removed deprecated unsafe arena string accessors
- Enabled heterogeneous lookup for std::string keys in maps.
- โ Removed implicit conversion from StringPiece to std::string
- ๐ Fix use-after-destroy bug when the Map is allocated in the arena.
- ๐ Improved the randomness of map ordering
- โ Added stack overflow protection for text format with unknown fields
- ๐ Use std::hash for proto maps to help with portability.
- โ Added more Windows macros to proto whitelist.
- Arena constructors for map entry messages are now marked "explicit"
(for regular messages they were already explicit). - ๐ Fix subtle aliasing bug in RepeatedField::Add
- ๐ Fix mismatch between MapEntry ByteSize and Serialize with respect to unset
fields.
Python:
- ๐ JSON format conformance fixes:
- Reject lowercase t for Timestamp json format.
- Print full_name directly for extensions (no camelCase).
- Reject boolean values for integer fields.
- Reject NaN, Infinity, -Infinity that is not quoted.
- Base64 fixes for bytes fields: accept URL-safe base64 and missing padding.
- ๐ Bugfix for fields/files named "async" or "await".
- Improved the error message when AttributeError is returned from getattr
in EnumTypeWrapper.
Java:
- ๐ Fixed a bug where setting optional proto3 enums with setFooValue() would
not mark the value as present. - โ Add Subtract function to FieldMaskUtil.
C#:
- โฌ๏ธ Dropped support for netstandard1.0 (replaced by support for netstandard1.1).
๐ This was required to modernize the parsing stack to use theSpan<byte>
type internally. (#7351) - โ Add
ParseFrom(ReadOnlySequence<byte>)
method to enable GC friendly
๐ parsing with reduced allocations and buffer copies. (#7351) - โ Add support for serialization directly to a
IBufferWriter<byte>
or
to aSpan<byte>
to enable GC friendly serialization.
The new API is available as extension methods on theIMessage
type. (#7576) - Add
GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
define to make
generated code compatible with old C# compilers (pre-roslyn compilers
๐ from .NET framework and old versions of mono) that do not support
ref structs. Users that are still on a legacy stack that does
๐ not support C# 7.2 compiler might need to use the new define
๐ in their projects to be able to build the newly generated code. (#7490) - ๐ Due to the major overhaul of parsing and serialization internals (#7351 and #7576),
it is recommended to regenerate your generated code to achieve the best
๐ performance (the legacy generated code will still work, but might incur
๐ a slight performance penalty).
- The C extension is completely rewritten. The new C extension has significantly