Skip to content

Protocol Buffers v25.0

Compare
Choose a tag to compare
@haberman haberman released this 01 Nov 22:50
· 3542 commits to main since this release

Announcements

  • This release fixes CVE-2024-2410 (note: there may be a delay in the publication of this CVE number), a minor vulnerability in the C++ JSON parser. In certain situations, a malicious JSON input could cause the parser to copy data that has already been freed into an error message. This can only happen if the code is parsing from a stream with separate chunks rather than a contiguous array. The bug was introduced in 4.22.0 and was fixed with b955165 in 4.25.0 and up.
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Compiler

  • Implement proto2/proto3 with editions (3813b66)
  • Defines Protobuf compiler version strings as macros and separates out suffix string definition. (3c59585)
  • Add utf8_validation feature back to the global feature set. (153028d)
  • Setting up version updater to prepare for poison pills and embedding version info into C++, Python and Java gencode. (4322e00)
  • Merge the protobuf and upb Bazel repos (7286ffc)
  • Editions: Introduce functionality to protoc for generating edition feature set defaults. (4019e25)
  • Editions: Migrate edition strings to enum in C++ code. (f083ebf)
  • Create a reflection helper for ExtensionIdentifier. (4d5ab73)
  • Editions: Provide an API for C++ generators to specify their features. (e897bcf)
  • Editions: Refactor feature resolution to use an intermediate message. (57d8049)
  • Publish extension declarations with declaration verifications. (e72b0e1)
  • Editions: Stop propagating partially resolved feature sets to plugins. (b66ef4c)
  • Editions: Migrate string_field_validation to a C++ feature (1f95830)
  • Editions: Include defaults for any features in the generated pool. (15863ff)
  • Protoc: parser rejects explicit use of map_entry option (#13479) (8f59292)
  • Protoc: validate that reserved range start is before end (#13474) (3be00f7)
  • Protoc: support identifiers as reserved names in addition to string literals (only in editions) (#13471) (e701f4f)
  • Drop support for Bazel 5. (a80daa2)
  • Allow code generators to specify whether or not they support editions. (2176a14)

C++

  • Set PROTOBUF_EXPORT on InternalOutOfLineDeleteMessageLite() (#14434) (db89a51)
  • Update stale checked-in files (#14431) (ada0be8)
  • Apply PROTOBUF_NOINLINE to declarations of some functions that want it. (6e848b0)
  • Implement proto2/proto3 with editions (3813b66)
  • Make JSON UTF-8 boundary check inclusive of the largest possible UTF-8 character. (e80b8ec)
  • Reduce Map::size_type to 32-bits. Protobuf containers can't have more than (95d2b2e)
  • Defines Protobuf compiler version strings as macros and separates out suffix string definition. (3c59585)
  • Add ABSL_ATTRIBUTE_LIFETIME_BOUND attribute on generated oneof accessors. (e33e0d2)
  • Fix bug in reflection based Swap of map fields. (bef5b75)
  • Add utf8_validation feature back to the global feature set. (153028d)
  • Setting up version updater to prepare for poison pills and embedding version info into C++, Python and Java gencode. (4322e00)
  • Add prefetching to arena allocations. (fbdeb5a)
  • Merge the protobuf and upb Bazel repos (7286ffc)
  • Add ABSL_ATTRIBUTE_LIFETIME_BOUND attribute on generated repeated and map field accessors. (9a0a3cf)
  • Editions: Migrate edition strings to enum in C++ code. (f083ebf)
  • Workaround ICE on gcc 7.5 by not having one overload call the other one with a (0522054)
  • Create a reflection helper for ExtensionIdentifier. (4d5ab73)
  • Editions: Provide an API for C++ generators to specify their features. (e897bcf)
  • Add ABSL_ATTRIBUTE_LIFETIME_BOUND attribute on generated string field accessors. (18c338a)
  • Editions: Refactor feature resolution to use an intermediate message. (57d8049)
  • Fixes for 32-bit MSVC. (66cf6b1)
  • Publish extension declarations with declaration verifications. (e72b0e1)
  • Export the constants in protobuf's any.h to support DLL builds. (fd24b1b)
  • Implement AbslStringify for the Descriptor family of types. (230232a)
  • Add ABSL_ATTRIBUTE_LIFETIME_BOUND attribute on generated message field accessors. (064035c)
  • Editions: Stop propagating partially resolved feature sets to plugins. (b66ef4c)
  • Editions: Migrate string_field_validation to a C++ feature (1f95830)
  • Editions: Include defaults for any features in the generated pool. (15863ff)
  • Introduce C++ feature for UTF8 validation. (c7119e6)
  • Protoc: validate that reserved range start is before end (#13474) (3be00f7)
  • Remove option to disable the table-driven parser in protoc. (6d03f9b)
  • Lock down ctype=CORD in proto file. (b359e50)
  • Support split repeated fields. (5b5e5bf)
  • In OSS mode omit some extern template specializations. We have seen reports of (ab96824)
  • Automated rollback of commit adb2c4b. (0ea0052)
  • Allow code generators to specify whether or not they support editions. (2176a14)
  • Handle conflicting macros for FreeBSD (#13303) (2a95295)

Java

  • Implement proto2/proto3 with editions (3813b66)
  • Remove synthetic oneofs from Java gencode field accessor tables. (9ad2268)
  • Timestamps.parse: Add error handling for invalid hours/minutes in the timezone offset. (8f85138)
  • Defines Protobuf compiler version strings as macros and separates out suffix string definition. (3c59585)
  • Add ABSL_ATTRIBUTE_LIFETIME_BOUND attribute on generated oneof accessors. (e33e0d2)
  • Automated rollback of commit 2a55706. (30b6251)
  • Add missing debugging version info to Protobuf Java gencode when multiple files are generated. (301dfc5)
  • Fix a bad cast in putBuilderIfAbsent when already present due to using the result of put() directly (which is null if it currently has no value) (785c82d)
  • Setting up version updater to prepare for poison pills and embedding version info into C++, Python and Java gencode. (4322e00)
  • Fix a NPE in putBuilderIfAbsent due to using the result of put() directly (which is null if it currently has no value) (47cec39)
  • Update Kotlin compiler to escape package names (#13310) (437ec35)
  • Add MapFieldBuilder and change codegen to generate it and the put{field}BuilderIfAbsent method. (955d4ab)
  • Introduce recursion limit in Java text format parsing (bca3bed)
  • Consider the protobuf.Any invalid if typeUrl.split("/") returns an empty array. (004f54a)
  • Mark FieldDescriptor.hasOptionalKeyword() as deprecated. (d6157f7)

Kotlin

  • Add ByteString.isNotEmpty Kotlin extension function. (961779e)

Csharp

Objective-C

  • Merge the protobuf and upb Bazel repos (7286ffc)
  • [ObjC] Flip the default for two generation options. (08bbb57)
  • [ObjC] Enable generation of .proto files using editions. (55ab831)
  • [ObjC] add "generate_minimal_imports" generation option (0b817d4)
  • [ObjC] Add generation control for descriptor custom options. (bd9d689)
  • Lock down ctype=CORD in proto file. (b359e50)

Rust

  • Merge the protobuf and upb Bazel repos (7286ffc)

Python

  • Fixed Python memory leak in map lookup. (1711ebd)
  • Loosen upb for json name conflict check in proto2 between json name and field (41af1d5)
  • Defines Protobuf compiler version strings as macros and separates out suffix string definition. (3c59585)
  • Add ABSL_ATTRIBUTE_LIFETIME_BOUND attribute on generated oneof accessors. (e33e0d2)
  • Ensure Timestamp.ToDatetime(tz) has correct offset (f0c56f9)
  • Do not check required field for upb python MergeFrom (1e0bc56)
  • Setting up version updater to prepare for poison pills and embedding version info into C++, Python and Java gencode. (4322e00)
  • Merge the protobuf and upb Bazel repos (7286ffc)
  • Comparing a proto message with an object of unknown returns NotImplemented (12d4f41)
  • Emit slots in pyi output as a tuple rather than a list for --pyi_out. (4a4f615)
  • Fix a bug that strips options from descriptor.proto in Python. (27d42c5)
  • Raise warings for message.UnknownFields() usages and navigate to the new add (c988759)
  • Add protobuf python keyword support in path for stub generator. Also added tests for (4cc258a)
  • Add tuple support to set Struct (533fbbb)

Python C-Extension (Default)

  • Comparing a proto message with an object of unknown returns NotImplemented (protocolbuffers/upb@243add4)
  • See also UPB changes below, which may affect Python C-Extension (Default).

PHP

  • Merge the protobuf and upb Bazel repos (7286ffc)

PHP C-Extension

  • Bump minimum PHP to 8.0 (b4abcef)
  • See also UPB changes below, which may affect PHP C-Extension.

Ruby

Ruby C-Extension

  • Merge the protobuf and upb Bazel repos (7286ffc)
  • Ruby: Fix object cache lookups on 32-bit platforms (#13494) (055c378)
  • Ruby FFI implementation (#13343) (c52d80c)
  • See also UPB changes below, which may affect Ruby C-Extension.

UPB (Python/PHP/Ruby C-Extension)

Other

  • Expose alias to protobuf_nowkt runtime (5b6c245)
  • Update absl submodule and dep to latest 20230802.0 LTS (#13515) (e7bb34d)