Skip to content

Protocol Buffers v24.0

Compare
Choose a tag to compare
@ericsalo ericsalo released this 08 Aug 22:15
· 7012 commits to main since this release

Announcements

  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Compiler

  • Drop support for Bazel 5. (fff4905)
  • Allow code generators to specify whether or not they support editions. (e2cec78)
  • Release prototype of Protobuf Editions. (4f9e417)
  • Compiler: Correct depfile generation when there are no outputs (a44fc2b)
  • Add dllexport_decl for generated default instance. (#13085) (9d0961a)
  • In TSan mode, detect concurrent mutations of repeated/map fields. (d800c5f)
  • Add a workaround for GCC constexpr bug (e15326b)
  • Turn on the table-driven parser by default, as it is no longer experimental. (c3e2efe)
  • Shrink code size of generated protocol buffer code via a few (97c3513)
  • Implement enforcement of target constraints (e3848c1)
  • Fix(libprotoc): export useful symbols from .so (44b4bcc)

C++

  • In OSS mode omit some extern template specializations. We have seen reports of compilers falling over due to the size of translation units. (2ed49c9)
  • Automated rollback of commit adb2c4b. (9f2d7ea)
  • Fix building shared libraries on MinGW-w64 (#13240) (c2f07bb)
  • Enable TSan validation to detect when a mutable accessor of a message is called concurrently with another accessor on the same message, which is a data race. (0275e51)
  • Release prototype of Protobuf Editions. (4f9e417)
  • Enable TSan validation to detect when a mutable accessor of a message is called concurrently with another accessor on the same message, which is a data race. (e2eae81)
  • Fix case of locality optimizer being wrong for split repeated fields and add a check that the optimized order has the same size as the unoptimized order. (76a327e)
  • Enable TSan validation to detect when a mutable accessor of a message is called concurrently with another accessor on the same message, which is a data race. (80dbc50)
  • Mark single arg ctor explicit in DynamicMessageFactory. (8fe88a5)
  • Enable TSan validation to detect when a mutable accessor of a message is called concurrently with another accessor on the same message, which is a data race. (6d79d13)
  • Let ParseRepeatedStringOnce call AllocateFromStringBlock(). (bcf3e36)
  • Check next tag in MpRepeatedMessage. (9e1cf6f)
  • When parsing repeated primitives, append to a tmp array on stack. (adb2c4b)
  • Add dllexport_decl for generated default instance. (#13085) (9d0961a)
  • TextFormat::ParseFieldValueFromString now takes absl::string_view as input instead of const std::string & (5411fc6)
  • In TSan mode, detect concurrent mutations of repeated/map fields. (d800c5f)
  • Use the same ABI for static and shared libraries on non-Windows platforms (#12983) (4329fde)
  • Replace ColdChunkSkipper with iterator-based approach. (ad677f3)
  • Check invalid type_id after casting it to uint32_t. (d890126)
  • Strengthen assertions on reflection methods. (eb5e9e0)
  • Add assertions to reflection methods. (5866e45)
  • Fail to parse message sets if type_id is zero. (bc1b1f6)
  • Enable the use of [SU]Int32Size and EnumSize templates for AArch64 (#11102) (e285d3e)
  • Add a workaround for GCC constexpr bug (e15326b)
  • Add ABSL_ATTRIBUTE_LIFETIME_BOUND attribute on Map, RepeatedField and RepeatedPtrField. (7b7ba2d)
  • Turn on the table-driven parser by default, as it is no longer experimental. (c3e2efe)
  • Fix: avoid warnings on MSVC (#12697) (4fcf2c0)
  • Fix: avoid warnings on Windows (#12701) (f9108c2)
  • Shrink code size of generated protocol buffer code via a few (97c3513)
  • Fix(libprotoc): export useful symbols from .so (#12619) (b1ae4fa)
  • Forbid embedded nulls in json_name. (b478a29)
  • Implement option retention for C# (5f64444)
  • Implement enforcement of target constraints (e3848c1)
  • Make RepeatedField and RepeatedPtrField be destructor skippable for proto arenas. (e4168df)
  • Update MessageDifferencer to conditionally force comparing additional fields while doing PARTIAL comparison (compare fields which are not repeated, have no presence and are set to their default value). (748f57f)
  • CMake: Use the correct jsoncpp target name in static builds (#12733) (d372fcd)
  • Fix: missing -DPROTOBUF_USE_DLLS in pkg-config (#12700) (f86008a)
  • Avoid using string(JOIN..., which requires cmake 3.12 (adee0a5)

Java

  • Put a 4k limit on preallocation to prevent OOM from malformed inputs. (173adca)
  • Mark OneofDescriptor.isSynthetic() deprecated. (b6b86e2)
  • Use ProtobufArrayList for repeated bytes field. Presize primitive arrays for fixed-length primitives. (b0b926a)
  • Add protobuf-kotlin into protobuf-bom (#12936) (943b696)
  • Handle clear for Java proto3 optionals (synthetic oneofs) using field descriptor instead of clear method. (a534902)
  • Deps: Update Guava to 32.0.0 (#12953) (cd615a8)
  • Migrate repeated numeric fields to use bit field to track presence instead of using it to indicate the field mutability to potentially skip work on the field during build operations. (f0de774)
  • Automated rollback of commit 3e188b7. (a1b3ff0)

Csharp

  • [C#] Replace regex that validates descriptor names (#12174) (cfb702a)
  • Implement option retention for C# (5f64444)

Objective-C

  • Release prototype of Protobuf Editions. (4f9e417)
  • Check invalid type_id after casting it to uint32_t. (d890126)
  • Fix jruby encoding in new thread (#12919) (6609bea)
  • Add assertions to reflection methods. (5866e45)
  • [C#] Replace regex that validates descriptor names (#12174) (cfb702a)

Python

  • Raise warinings when extend repeated field with none iterable in OSS. OSS will raise errors soon (96ca7d9)
  • Remove RegisterExtension in message class (3560e23)
  • Removed message._extensions_by_number (86fc32c)
  • Removed message._extensions_by_name (e737c81)
  • Remove RegisterExtension() in python generated code (e5a7a2e)
  • Deprecated APIs that add non top descriptors to pool will be removed soon (3f5d844)

Python C-Extension (Default)

  • Remove RegisterExtension in message class (protocolbuffers/upb@cbacdf1)
  • See also UPB changes below, which may affect Python C-Extension (Default).

PHP

  • Adding provide to php composer.json (#13141) (d603b41)
  • Require PHP version >=8.0, Ruby >=2.7, and Python >=3.8 (a5516ca)
  • Enable building PHP extension on Windows (#13097) (4d9bbac)
  • Add support for option retention in PHP (ba348e2)

PHP C-Extension

  • Release prototype of Protobuf Editions. (4f9e417)
  • Enable building PHP extension on Windows (#13097) (4d9bbac)
  • Remove RegisterExtension in message class (3560e23)
  • See also UPB changes below, which may affect PHP C-Extension.

Ruby

  • Update ruby gemspec required ruby version to >=2.7 (14ea2cb)
  • Refactor the object cache to better account for race conditions (#13204) (a01d047)
  • Fix jruby encoding in new thread (#12919) (6609bea)
  • Implement option retention for Ruby (d96032d)

Ruby C-Extension

  • Refactor the object cache to better account for race conditions (#13204) (a01d047)
  • Release prototype of Protobuf Editions. (4f9e417)
  • Remove RegisterExtension in message class (3560e23)
  • See also UPB changes below, which may affect Ruby C-Extension.

UPB (Python/PHP/Ruby C-Extension)

Other

  • Drop Bazel 4 support and add Bazel 6 (4031712)
  • Bump Abseil submodule to 20230125.3 (#12660) (2a3ce31)
  • Added a conformance test for embedded nulls in JSON strings. (37dfe80)