Protocol Buffers Changelog

What's new in Protocol Buffers 3.27.0 RC 3

May 14, 2024
  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Compiler:
  • Add extension declarations for known features. (f8d0a5b)
  • Java:
  • Add java to reserved names to escape extensions to java_. This may break existing references to gencode for extensions named java. (c18cb95)
  • Csharp:
  • Regenerate stale files (4c85a1a)
  • Python:
  • Add temporary alias for system_python.bzl at previous location . (#16787) (ffd753f)
  • PHP:
  • PHP C-Extension:
  • Regenerate stale files (4c85a1a)
  • Other:
  • Clear repository cache between bazel runs (3bc8667)
  • Work around windows path length limitations by moving immutable -> full in open source (new generator paths) and shortening long file names. (#16825) (615e704)

New in Protocol Buffers 3.27.0 RC 2 (May 9, 2024)

  • Compiler:
  • Refactored the Java generator into separate packages and targets. (bd81fd9)
  • C++:
  • Fix validation checks of implicit presence. (bdf6b10)
  • Clarify map behaviors in editions. (61c9187)
  • Java:
  • Deprecate building from source with Maven to be removed in 4.28.x. (51b48a4)
  • Split bootstrapped java_features.proto to keep it from leaking out. (d56cb7d)
  • Refactored the Java generator into separate packages and targets. (bd81fd9)
  • Other:
  • Move the windows path length workarounds out of protobuf-ci (9d715cb)
  • Update src/file_lists.cmake for staleness (cd337dd)
  • Add system_python to protobuf_deps.bzl. (65ee123)
  • Migrate bazel tests to protobuf-ci. (1ee203b)
  • Fix bazel cache issues in 7.0.0 (16acf7e)

New in Protocol Buffers 3.27.0 RC 1 (Apr 18, 2024)

  • Compiler:
  • Officially release Editions in 27.0. (baa83b6)
  • Define lifetimes of edition 2023 features (77f62de)
  • Implement feature lifetime validation in protoc and the C++ runtime. (b3b4497)
  • Add edition lifetime options for feature specs. (b09b3e4)
  • Enable editions support for Java Lite. (500c953)
  • Release edition defaults CLI arguments. (7a0e10e)
  • Update protoc release to include editions language features protos for Java and C++ (6483c47)
  • C++:
  • [C++] Ensure we allocate overaligned types with aligned operator new. (11ef0ff)
  • Fix text-format delimited field handling (29c69ff)
  • In debug mode, after clearing oneof messages on arenas, poison them if ASAN. (8826baf)
  • Allow string_type for Edition 2023. (d8251eb)
  • Breaking change: Ensure we allocate overaligned types with aligned operator new. (11ef0ff)
  • Python JSON parser: Ignore invalid enum string values if ignore_unknown_fields is set (#15887) (86abf35)
  • Move java_features.proto to java/core/srce/main/resources (274bc7f)
  • Add an RAII namespace printer helper for C++ codegen. (8599ab5)
  • Enable editions support for Java Lite. (500c953)
  • Add an RAII ifndef helper for C++ codegen. (1087274)
  • Clear oneof message fields even on arena on non-OPT builds. (5c183bd)
  • Implement edition 2023 support in all Ruby runtimes. (bca8fb6)
  • Release edition defaults CLI arguments. (7a0e10e)
  • Deprecate Arena::CreateMessage for OSS. (d4bfe52)
  • Open sourcing reflection_visit_fieds. (cfc07df)
  • Fixed the use of c++ keywords within namespace names (#15954) (988194a)
  • Fix pkg-config metadata for shared abseil on windows (#15888) (fe6edca)
  • Add GetStringView() and GetRepeatedStringView() with scratch. (a3f5af0)
  • Avoid a 'may be used uninitialized' warning when built with '-c opt'. (#15846) (eb70b34)
  • Add software prefetch to ByteSizeLong (948ca2e)
  • Add prefetching in arena blocks. (9e57b8e)
  • Breaking change: Remove the deprecated always_print_primitive_fields option from Java, Python and C++ JSON parsers. (2699579)
  • Rename the 'includingDefaultValueWithoutPresenceFields' and 'always_print_without_presence_fields' to 'alwaysPrintFieldsWithNoPresence' in the Cpp, Py and Java JSON serializers for consistency. (7d43131)
  • Remove tags for arena cleanup nodes now that we have dedicated string cleanup blocks. (202b106)
  • Avoid unused-parameter warning in field accessor listeners. (f4d5c2c)
  • Add new 'always_print_without_presence_fields' option to the C++ JSON serializer. (671b61b)
  • Fail to build descriptor if ctype is specified for non string/bytes fields (8b4c7a1)
  • Check ctype() in DescriptorBuilder for edition 2023 and beyond. (307aeac)
  • Fail building descriptors if ctype is used for fields other than string or bytes. (403e207)
  • Fix generation of HasExtension and ExtensionSize functions to restrict to the (9f5be07)
  • Add the privacy manifest to the C++ CocoaPod. (982ea24)
  • Java:
  • Define lifetimes of edition 2023 features (77f62de)
  • Check that size is non-negative when reading string or bytes in StreamDecoder. (a94f57b)
  • Fix text-format delimited field handling (29c69ff)
  • Move java_features.proto to java/core/srce/main/resources (274bc7f)
  • Add java_features.proto to kotlin_mvn release (369732a)
  • Enable editions support for Java Lite. (500c953)
  • Fix descriptor to access type via getType() s.t. messages using delimited encoding are consistently treated as groups for Java lite. (9f001a9)
  • Make UnsafeByteOperations stable; removing experimental annotation. (0070ac1)
  • Fix features inheritance of oneof fields and extensions and fix/move unit tests to actually run. (eb10ebd)
  • Add software prefetch to ByteSizeLong (948ca2e)
  • Breaking change: Remove the deprecated always_print_primitive_fields option from Java, Python and C++ JSON parsers. (2699579)
  • Rename the 'includingDefaultValueWithoutPresenceFields' and 'always_print_without_presence_fields' to 'alwaysPrintFieldsWithNoPresence' in the Cpp, Py and Java JSON serializers for consistency. (7d43131)
  • Add a new 'includingDefaultValueWithoutPresenceFields' option to the Java parser which is intended to replace the current 'includingDefaultValueFields'. (58baeb4)
  • Kotlin:
  • Add java_features.proto to kotlin_mvn release (369732a)
  • Csharp:
  • C#: Optimize JSON parsing in JsonTokenizer (68e6e3e)
  • C#: Avoid string concatenation when looking up enum values by name. (e6684ac)
  • Cache StringBuilder instances in the .NET JsonTextTokenizer. (fac929d)
  • Enable Editions in the C# generator. (421040b)
  • Runtime support for Protobuf Editions in C#. (450022d)
  • Tweak "group to property name" mapping for C#. Under editions, where fields using a delimited encoding have independent field names from type names, we want to use the specified field name. (139ea4d)
  • C#: Ignore invalid enum string values in JSON, when invalid fields are being ignored. (55e50ba40679eb82269c62872116b...

New in Protocol Buffers 3.26.1 (Mar 27, 2024)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • C++:
  • Expand cpp_features_proto_srcs visibility (2d3d8ba)
  • Move java_features.proto to java/core/srce/main/resources (22f1170)
  • Java:
  • Fix validateFeatures to be called after resolved features are actually set to this.features (9bf69ec)
  • Move java_features.proto to java/core/srce/main/resources (22f1170)
  • Set label to REQUIRED for descriptors with LEGACY_REQUIRED feature. (4886a9c)
  • Add java_features.proto to kotlin_mvn release (0e4abf9)
  • Kotlin:
  • Add java_features.proto to kotlin_mvn release (0e4abf9)
  • Ruby:
  • Cherry-pick required label handling in JRuby field descriptor from bca8fb6 (2e51ff6)
  • Other:
  • Update protoc release to include editions language features protos for Java and C++ (7f45773)
  • Fix Android platforms constraint (#16246) (#16271) (b4e1870)
  • Add back android config_setting that looks for //external:android/crosstool (#16127) (#16264) (a97c927)

New in Protocol Buffers 3.26.0 RC 3 (Feb 29, 2024)

  • C++:
  • Remove rust proto libraries from the editions/BUILD file. (1f9d9fb)
  • Fix CMake regex escaping. (3ad69cf)
  • Escape _from_dir in install.cmake for regex special characters (e.g. c++) before REGEX REPLACE. (f740f52)
  • Tweak BUILD setup to make the layering check change less disruptive (#15838) (52aa150)
  • Add missing alias targets for C++ util libraries (#15783) (62e7a56)
  • Rust:
  • Tweak BUILD setup to make the layering check change less disruptive (#15838) (52aa150)
  • PHP:
  • PHP C-Extension:
  • Updated amalgamations for PHP and Ruby. (c773dc9)
  • See also UPB changes below, which may affect PHP C-Extension.
  • Ruby:
  • Ruby implement memsize functions for native types (#10291) (4902fc0)
  • Moved ObjectCache into an internal module. (9087337)
  • Ruby C-Extension:
  • Updated amalgamations for PHP and Ruby. (c773dc9)
  • Ruby implement memsize functions for native types (#10291) (4902fc0)
  • Moved ObjectCache into an internal module. (9087337)
  • See also UPB changes below, which may affect Ruby C-Extension.
  • UPB (Python/PHP/Ruby C-Extension):
  • Ruby implement memsize functions for native types (#10291) (4902fc0)
  • Other:
  • Disabled macOS 8.2, to match main. (9dfa2b6)

New in Protocol Buffers 3.25.3 (Feb 16, 2024)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Apple Privacy Manifest Requirement:
  • [CPP] Add the privacy manifest to the C++ CocoaPod. (9d1bc10)
  • [ObjC] Add the privacy manifest to the ObjC CocoaPod. (cec08dc)
  • Add PrivacyInfo.xcprivacy (#15557) (cf87faa)
  • C++:
  • Remove use of mach_absolute_time (#15554) (76d05d4)
  • Objective-C:
  • [ObjC] Use a local to avoid warnings in 32bit builds. (9dc736d)
  • Python:
  • Bump python version to 3.9 for gcloud 460.0.0 (17ec19d)
  • Ruby:
  • Update Ruby GHA to test against Ruby 3.3. (25b1e81)
  • Pin bundler version to 2.4.22 for Ruby 2.7 support. (80b4586)

New in Protocol Buffers 3.26.0 RC 2 (Feb 6, 2024)

  • Announcements:
  • This version includes breaking changes to: C++, Java, PHP, Python.
  • [PHP] Remove deprecated legacy class aliases. (#15709) (096e127)
  • [Java] Remove the deprecated always_print_primitive_fields option from Java, Python and C++ JSON parsers. (06e7cab)
  • [Python] Remove the deprecated always_print_primitive_fields option from Java, Python and C++ JSON parsers. (06e7cab)
  • [Python] Removed obsolete/duplicate setup.py from Python. (#15708) (5722aef)
  • [C++] Remove the deprecated always_print_primitive_fields option from Java, Python and C++ JSON parsers. (06e7cab)
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • C++:
  • Breaking change: Remove the deprecated always_print_primitive_fields option from Java, Python and C++ JSON parsers. (06e7cab)
  • Rename the 'includingDefaultValueWithoutPresenceFields' and 'always_print_without_presence_fields' to 'alwaysPrintFieldsWithNoPresence' in the Cpp, Py and Java JSON serializers for consistency. (fc41e78)
  • Add new 'always_print_without_presence_fields' option to the C++ JSON serializer. (1f3bf1d)
  • Remove use of mach_absolute_time (#15554) (#15662) (8b0f6fd)
  • Check ctype() in DescriptorBuilder for edition 2023 and beyond. (0090f19)
  • Fail building descriptors if ctype is used for fields other than string or bytes. (624d65d)
  • [CPP] Add the privacy manifest to the C++ CocoaPod. (#15664) (e7888a1)
  • Java:
  • Breaking change: Remove the deprecated always_print_primitive_fields option from Java, Python and C++ JSON parsers. (06e7cab)
  • Rename the 'includingDefaultValueWithoutPresenceFields' and 'always_print_without_presence_fields' to 'alwaysPrintFieldsWithNoPresence' in the Cpp, Py and Java JSON serializers for consistency. (fc41e78)
  • Add a new 'includingDefaultValueWithoutPresenceFields' option to the Java parser which is intended to replace the current 'includingDefaultValueFields'. (043191b)
  • Force descriptor initialization of dependencies before internalUpdateFileDescriptor(). (#15718) (4dec1a7)
  • Correctly set maven-compiler-plugin to >= Java 1.8 per our minimum Java version (#15707) (6028cdb)
  • Update internalUpdateFileDescriptor() to synchronize setProto() and resolveAllFeatures() to avoid data races. (#15659) (225b080)
  • Objective-C:
  • [ObjC] Use a local to avoid warnings in 32bit builds. (#15665) (394aec8)
  • [ObjC] Add the privacy manifest to the ObjC CocoaPod. (#15663) (935fcb7)
  • Python:
  • Adhere to PEP 8 (#15127) (#15729) (3b92f4f)
  • Breaking change: Remove the deprecated always_print_primitive_fields option from Java, Python and C++ JSON parsers. (06e7cab)
  • Rename the 'includingDefaultValueWithoutPresenceFields' and 'always_print_without_presence_fields' to 'alwaysPrintFieldsWithNoPresence' in the Cpp, Py and Java JSON serializers for consistency. (fc41e78)
  • Add new including_default_value_without_presence_fields to Python JSON serializer. (c530216)
  • Breaking change: Removed obsolete/duplicate setup.py from Python. (#15708) (5722aef)
  • PHP:
  • Don't break the trace (#11311) (#15727) (3e99024)
  • Fix inconsistent timestamp json encode/decode (#12396) (#15726) (e99f27e)
  • Breaking change: Remove deprecated legacy class aliases. (#15709) (096e127)
  • Ruby:
  • Increased the size of the error message buffer by 4x, to 511 bytes. (#15728) (ab6bcba)
  • Move the RubyMessage.java JSON "include defaults" to use alwaysPrintFieldsWithNoPresence. (b5beba3)
  • UPB (Python/PHP/Ruby C-Extension):
  • Increased the size of the error message buffer by 4x, to 511 bytes. (#15728) (ab6bcba)
  • Other:
  • Add PrivacyInfo.xcprivacy (#15557) (#15661) (5a5ec6c)

New in Protocol Buffers 3.26.0 RC 1 (Jan 26, 2024)

  • Announcements:
  • This version includes breaking changes to: C++, Java, PHP, Python, Ruby.
  • [C++] Make protobuf comply with the C++ layering check (a7b0421)
  • [C++] Remove const GetArena method on RepeatedPtrField (748ab16)
  • [C++] Disallow incorrect ctype usage (755b690)
  • [C++] Remove deprecated std::string error collector overrides (543fbcd)
  • [C++] Promote ExtensionRange to a proper class (5b12bc8)
  • [C++] Remove deprecated clear APIs on repeated fields (229906f)
  • [C++] Remove C++ legacy syntax descriptor APIs (cf2d696)
  • [C++] Remove deprecated syntax APIs (715b543)
  • [C++] Remove deprecated SupportsUnknownEnumValues method (0a6a516)
  • [Java] Remove unused helper methods for creating new mutable arraylists. (7874474)
  • [Java] Use Editions features in Java full runtimes. (65c65c2)
  • [Java] Stop generating the "newInstance" method. This is not used anymore. (c0d08bd)
  • [Java] Remove unused overload of AbstractMessageLite.addAll that worked on a Collection instead of a List. (3b9bd6d)
  • [Java] Remove obsolete runtime internalBuildGeneratedFileFrom which was for backwards compatibility with old gencode. (9310d2e)
  • [Java] Remove unnecessary overloads of methods: (94a2a44)
  • [Java] Remove unnecessary generated overrides for GeneratedMessage.Builder methods: (7bff169)
  • [Java] The base class for generated messages will be GeneratedMessage, not GeneratedMessageV3.
  • (5df0387)
  • [Java] Remove deprecated runtime methods for compatibility with old v2.x.x gencode. (e555bd2)
  • [Java] Remove deprecated TextFormat print methods. These should be replaced by corresponding TextFormat.printer() methods. (dfb8a4c)
  • [Java] Lock down visibility for descriptor syntax APIs. (1aeacd4)
  • [Java] Make deprecated Java gencode PARSER variable private. (b4858b2)
  • [PHP] Validate UTF-8 in string setters, as previously announced. (d14dbbc)
  • [PHP] Remove support for PHP generic services (40ad3fa)
  • [Python] Made text_format output default to UTF-8. (bf00034)
  • [Python] Remove deprecated syntax accessor. (fd40c87)
  • [Python] Remove RegisterExtension in message class (4ebba68)
  • [Python] Reject extend repeated field with none iterable (Raise TypeError) (1658213)
  • [Python] Remove Deprecated APIs that add non top descriptor. (c51f111)
  • [Python] check if Timestamp is valid. (4f77929)
  • [Python] Remove msg.UnknownFields() support in pure python and cpp extension. (0eac77c)
  • [Ruby] Removed syntax and added has_presence?/is_packed?. (dbd4dce)
  • [Ruby] Fixed json_encode/json_decode to use the message's pool. (a8b8ea0)
  • [Ruby] Freeze is now recursive, affecting all sub-messages, maps, and repeated fields. (31313b1)
  • [Ruby] Fixed inconsistencies in Message#to_h, as previously announced. (fd69938)
  • [Ruby] Dropped support for Ruby DSL, as previously announced. (5cfc9e7)
  • [Ruby] Lock down visibility for descriptor syntax APIs. (1aeacd4)
  • [Ruby] Fixed json_encode/json_decode to use the message's pool. (a8b8ea0)
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Compiler:
  • Fix getting env variables on windows (#15518) (71b0b4e)
  • Proper fix utf8 command line arguments (#14253) (1eff9d7)
  • Allocate an editions FeatureSet extension for https://github.com/bufbuild/protobuf-es (fedd34d)
  • Make rules_ruby a dev-only dependency. (571b727)
  • C++:
  • Correct type_resolver_util to set syntax=proto3 instead of syntax=proto2 on proto3 files. (040dde7)
  • Remove edition getter from C++ descriptor APIs (93b219f)
  • Breaking change: Remove const GetArena method on RepeatedPtrField (748ab16)
  • Breaking change: Disallow incorrect ctype usage (755b690)
  • Breaking change: Remove deprecated std::string error collector overrides (543fbcd)
  • Breaking change: Promote ExtensionRange to a proper class (5b12bc8)
  • Breaking change: Remove deprecated clear APIs on repeated fields (229906f)
  • Breaking change: Remove C++ legacy syntax descriptor APIs (cf2d696)
  • Fixed UTF-8 TextFormat output to protect against invalid UTF-8 in string fields. (1ac8c04)
  • Breaking change: Remove deprecated syntax APIs (715b543)
  • Fix DurationToMilliseconds mult overflow (17b8dd6)
  • Breaking change: Remove deprecated SupportsUnknownEnumValues method (0a6a516)
  • Have Arena::Create support arena constructible types (578e07e)
  • Enforce stricter version checks for Protobuf C++ by removing the notion of "minimal version of protoc/headers"; exact version match is required. (6eed7a2)
  • Compare explicit zeroes from prototext in partially. (8c24163)
  • Move the declarations in SerialArena to more closely match the style guide. (349122f)
  • Java:
  • Drop Protobuf support for Android KitKat per EOL and add existing minimum Java 1.8 in Maven pom.xmls (303239d)
  • Breaking change: Remove unused helper methods for creating new mutable arraylists. (7874474)
  • Breaking change: Use Editions features in Java full runtimes. (65c65c2)
  • Breaking change: Stop generating the "newInstance" method. This is not used anymore. (c0d08bd)
  • Breaking change: Remove unused overload of AbstractMessageLite.addAll that worked on a Collection instead of a List. (3b9bd6d)
  • Breaking change: Remove obsolete runtime internalBuildGeneratedFileFrom which was for backwards compatibility with old gencode. (9310d2e)
  • Breaking change: Remove unnecessary overloads of methods: (94a2a44)
  • Breaking change: Remove unnecessary generated overrides for GeneratedMessage.Builder methods: (7bff169)
  • Breaking change: The base class for generated messages will be GeneratedMessage, not GeneratedMessageV3.
  • (5df0387)
  • Breaking change: Remove deprecated runtime methods for compatibility with old v2.x.x gencode. (e555bd2)
  • Breaking change: Remove deprecated TextFormat print methods. These should be replaced by corresponding TextFormat.printer() methods. (dfb8a4c)
  • Support pretty printing proto2 Extensions inside of proto3 Anys in TextFormat.Printer. (c8e0160)
  • Breaking change: Lock down visibility for descriptor syntax APIs. (1aeacd4)
  • Enable Protobuf version validations in Protobuf Java Full. (a2f9268)
  • Breaking change: Make deprecated Java gencode PARSER variable private. (b4858b2)
  • Add Automatic-Module-Name (#14562) (d580fde)
  • Use Editions features in Java, Kotlin, and Java Lite code generators. (90e1b49)
  • Kotlin:
  • Breaking change: Use Editions features in Java full runtimes. (65c65c2)
  • Breaking change: The base class for generated messages will be GeneratedMessage, not GeneratedMessageV3.
  • (5df0387)
  • Use Editions features in Java, Kotlin, and Java Lite code generators. (90e1b49)
  • Objective-C:
  • Improve handing of the WKT ObjC Category additions. (b146d14)
  • Add a unpack helper for GPBAny with extension support. (29fca8a)
  • Python:
  • Fixed a bug when deep copying a map field with a closed enum value. (ca5ca62)
  • Breaking change: Made text_format output default to UTF-8. (bf00034)
  • Fixed a SEGV when deep copying a non-reified sub-message. (b9e4894)
  • Make str(msg) in Python print raw UTF-8 strings. Only invalid UTF-8 is escaped. (f2a91b3)
  • Breaking Change: Remove RegisterExtension in message class (4ebba68)
  • Breaking Change: Reject extend repeated field with none iterable (Raise TypeError) (1658213)
  • Breaking Change: Remove Deprecated APIs that add non top descriptor. (c51f111)
  • Breaking Change: Check if Timestamp is valid. (4f77929)
  • [Python/upb] Fixed SEGV when attempting to delete a message attribute (de52944)
  • Breaking Change: Remove msg.UnknownFields() support in pure python and cpp extension. (0eac77c)
  • Breaking change: Remove deprecated syntax accessor. (fd40c87)
  • Fixed a bug where FileDescriptor maps like message_types_by_name could return descriptors from other files. (c05b320)
  • Mark the python generator for editions support. (b01bd1b)
  • Add support and partial CI coverage for Python 3.12 (24fef03)
  • Implement Editions in Pure Python. (15eccf3)
  • Properly untrack Python GC objects during deallocation. (e32d094)
  • Raise warnings for python syntax usages (c508a40)
  • Fixed Python memory leak in map lookup. (b0eeb35)
  • Fix handling of Unicode escapes in string data in textproto files. (62a435c)
  • PHP:
  • Raise minimum PHP version to 8.1, due to PHP 8.0 EOL per https://cloud.google.com/php/getting-started/supported-php-versions (3c8a3d2)
  • Breaking change: Validate UTF-8 in string setters, as previously announced. (d14dbbc)
  • Breaking change: Remove support for PHP generic services (40ad3fa)
  • Expand PHP generator to support overlapping subset of proto2. (b603fb6)
  • Feat: better debug info for PHP messages and repeated fields (#12718) (59d5006)
  • PHP C-Extension:
  • Breaking change: Validate UTF-8 in string setters, as previously announced. (d14dbbc)
  • Optimized binary/JSON parsing to no longer copy input data into a temp buffer. (588d5aa)
  • See also UPB changes below, which may affect PHP C-Extension.
  • Ruby:
  • Breaking change: Removed syntax and added has_presence?/is_packed?. (dbd4dce)
  • Breaking change: Fixed json_encode/json_decode to use the message's pool. (a8b8ea0)
  • Breaking change: Freeze is now recursive, affecting all sub-messages, maps, and repeated fields. (31313b1)
  • Breaking change: Fixed inconsistencies in Message#to_h, as previously announced. (fd69938)
  • Breaking change: Dropped support for Ruby DSL, as previously announced. (5cfc9e7)
  • In Ruby repeated fields, each_index actually iterates over the index (#11767) (f869cfa)
  • Breaking change: Lock down visibility for descriptor syntax APIs. (1aeacd4)
  • Make rules_ruby a dev-only dependency. (571b727)
  • Add support for extensions in CRuby, JRuby, and FFI Ruby (#14703) (42f8b77)
  • Add support for options in CRuby, JRuby and FFI (#14594) (ae1f2b7)
  • Ruby C-Extension:
  • Breaking change: Removed syntax and added has_presence?/is_packed?. (dbd4dce)
  • Breaking change: Fixed json_encode/json_decode to use the message's pool. (a8b8ea0)
  • Breaking change: Freeze is now recursive, affecting all sub-messages, maps, and repeated fields. (31313b1)
  • Breaking change: Fixed inconsistencies in Message#to_h, as previously announced. (fd69938)
  • Upb: fix Ruby bug which allowed map.delete(key) on a frozen map (df57e54)
  • Add support for extensions in CRuby, JRuby, and FFI Ruby (#14703) (42f8b77)
  • Add support for options in CRuby, JRuby and FFI (#14594) (ae1f2b7)
  • See also UPB changes below, which may affect Ruby C-Extension.
  • UPB (Python/PHP/Ruby C-Extension):
  • Wrap C++ headers in #ifdef __cplusplus. (fc2d9da)
  • Add kUpb_DecodeOption_AlwaysValidateUtf8 decode option, to force UTF-8 validation of proto2 strings. (d4dfb9c)
  • Fixed non-conformance in upb JSON enum decoding when ignoring unknown enum values. (c16ac66)
  • Fix upb's json decoder ignoring trailing characters after a successfully parsed object. (fa15c21)
  • Fix upb_MiniTable_GetOneof(miniTable, field) to work correctly if field is the very first field in the proto. (e6ea44c)
  • Enabled editions support for upb generated code. (cf3a6f5)
  • Upb: stop generating hazzers for repeated fields (fa62c92)
  • Other:
  • Extend Proto2 JSON test cases to cover more of the preexisting Proto3 JSON cases. (42ecd61)
  • Include JSON output tests with Proto2 messages in the conformance test suite. (255f95e)
  • Make the utf8_range implementation just in C (9c7d2b9)
  • Open-source editions Bazel rules for embedding defaults. (898d8fa)
  • Enable conformance tests over editions protos (a2ba8bc)
  • Move utf8_range into the protobuf repo (5ca8400)

New in Protocol Buffers 3.25.2 (Jan 10, 2024)

  • Only substitute prefixes during installation setup. (05ad652)
  • Register a shutdown delete for C++ feature defaults (3d5c709)

New in Protocol Buffers 3.25.1 (Nov 16, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Python:
  • Raise warnings for deprecated python syntax usages (74f5cf4)
  • Ruby:
  • Add support for extensions in CRuby, JRuby, and FFI Ruby (#14703) (#14756) (e4b00c7)
  • Add support for options in CRuby, JRuby and FFI (#14594) (#14739) (2495d4f)

New in Protocol Buffers 3.25.0 (Nov 2, 2023)

  • Announcements:
  • 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.

New in Protocol Buffers 3.25.0 RC 2 (Oct 18, 2023)

  • C++:
  • Set PROTOBUF_EXPORT on InternalOutOfLineDeleteMessageLite() (#14434) (db89a51)
  • Update stale checked-in files (#14431) (ada0be8)
  • PHP:
  • PHP C-Extension:
  • Bump minimum PHP to 8.0 (b4abcef)

New in Protocol Buffers 3.25.0 RC 1 (Oct 17, 2023)

  • Announcements:
  • 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++:
  • 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 Protob...

New in Protocol Buffers 3.24.4 (Oct 5, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • C++:
  • Add dependency on absl::layout, and explicitly include absl layout includes (#14042) (96c1a7d)
  • Include Abseil's str_cat.h for absl::AlphaNum (#14054) (955d371)
  • Java:
  • Rolled back breaking change to gencode before 3.15 (#14246) (b9cf19b)
  • Python:
  • Fix python code generation compatibility with Cython (#14240) (fe87c90)

New in Protocol Buffers 3.24.3 (Sep 7, 2023)

  • C++
  • Workaround ICE on gcc 7.5 by not having one overload call the other one with a (#13808) (398a84c)
  • Python
  • Python C-Extension (Default)
  • Added malloc_trim() calls to Python allocator so RSS will decrease when memory is freed (protocolbuffers/upb@b0f5d5d)
  • UPB (Python/PHP/Ruby C-Extension)
  • Fix a Python memory leak in ByteSize() (#1243) (e45a6d5)

New in Protocol Buffers 3.24.2 (Aug 26, 2023)

  • C++:
  • Fixes for 32-bit MSVC

New in Protocol Buffers 3.24.1 (Aug 19, 2023)

  • Python:
  • Python C-Extension (Default)
  • Revert CopyFrom() optimization that was causing crashes back to Serialize/Parse (protocolbuffers/upb@78e9694)
  • Ruby:
  • Ruby C-Extension:
  • Ruby: Fix object cache lookups on 32-bit platforms (#13494) (#13580) (3094b49)

New in Protocol Buffers 3.24.0 (Aug 9, 2023)

  • 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

New in Protocol Buffers 3.24.0 RC 3 (Aug 1, 2023)

  • Compiler:
  • Drop support for Bazel 5.
  • C++:
  • In OSS mode omit some extern template specializations. We have seen reports of compilers falling over due to the size of translation units.
  • Automated rollback of commit adb2c4b.

New in Protocol Buffers 3.24.0 RC 2 (Jul 19, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Compiler:
  • Allow code generators to specify whether or not they support editions. (e2cec78)
  • Java:
  • Put a 4k limit on preallocation to prevent OOM from malformed inputs. (173adca)
  • Ruby:
  • Update ruby gemspec required ruby version to >=2.7 (14ea2cb)

New in Protocol Buffers 3.24.0 RC 1 (Jul 12, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Compiler:
  • 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++:
  • 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:
  • 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)
  • 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

New in Protocol Buffers 3.23.4 (Jul 6, 2023)

  • Update protobuf dep to latest 23.x commit (#1388) (protocolbuffers/upb@455cfdb)

New in Protocol Buffers 3.23.3 (Jun 14, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • C++
  • Regenerate stale files (#13046) (58b6ddb):
  • Use the same ABI for static and shared libraries on non-Windows platforms (#12983) (efa1ec7)
  • Objective-C:
  • Regenerate stale files (#13046) (58b6ddb)
  • UPB (Python/PHP/Ruby C-Extension):
  • Fixed a bug in upb_Map_Delete() that caused crashes in map.delete(k) for Ruby when string-keyed maps were in use. (protocolbuffers/upb@2de798e)

New in Protocol Buffers 3.23.2 (May 26, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Compiler:
  • Add missing header to Objective-c generator
  • Java:
  • Rollback of - Simplify protobuf Java message builder by removing methods that calls the super class only. (b556b88)

New in Protocol Buffers 3.23.1 (May 17, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Compiler:
  • Add a workaround for GCC constexpr bug (67ecdde)
  • C++:
  • Add a workaround for GCC constexpr bug (67ecdde)
  • Csharp:
  • [C#] Replace regex that validates descriptor names (#12174) (0ced986)

New in Protocol Buffers 3.23.0 (May 9, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Compiler:
  • Implement a retain_options flag in protoc. (83507c7)
  • Make protoc --descriptor_set_out respect option retention (ae2531d)
  • Modify release artifacts for protoc to statically link system libraries. (723bd4c)
  • Extension declaration: Enforce that if the extension range has a declaration then all extensions in that range must be declared. This should prevent non-declared extensions from being added. (5dc171f)
  • Implement "reserved" for extension declaration. (41287bd)
  • Open-source extension declaration definition. (145900f)
  • C++:
  • Fix(libprotoc): export useful symbols from .so (46fb4aa)
  • Turn off clang::musttail on i386 (b40633f)
  • Fixes Clang 6 linker bug (49bb3f2)
  • Remove PROTOBUF_DEPRECATED in favor of [[deprecated]]. (5c59290)
  • Add assert to the list of keywords for C++. (a75c1a2)
  • Added Reflection::GetCord() method in C++ (6ecb5d0)
  • Support C++ protobuf ctype=CORD for bytes field (generated code). (714f975)
  • Expand LazySerializerEmitter to cover proto3 cases. (fab7f92)
  • Unconditionally generate unknown field accessors. (dd8a3cf)
  • Introduce proto filter for inject_field_listener_events. (2dc5338)
  • Add ParseFromCord to TextFormat (055a6c6)
  • Mark proto2::Arena::GetArena as deprecated. (9f95958)
  • Java:
  • Adds Timestamps.now(). (295f112)
  • Added Reflection::GetCord() method in C++ (6ecb5d0)
  • Re-attach OSGI headers to lite,core, and util. This information was dropped in the move from maven to bazel. (4b5652b)
  • Add Java FileDescriptor.copyHeadingTo() which copies file-level settings (e.g. syntax, package, file options) to FileDescriptorProto.Builder (6e6d0bc)
  • Remove unnecessary has bits from proto2 Java. (c440da9)
  • Add casts to make protobuf compatible with Java 1.8 runtime. (d40aadf)
  • Fix mutability bug in Java proto lite: sub-messages inside of oneofs were not (fa82155)
  • Document known quirks of EnumDescriptor::is_closed() when importing across files with different syntaxes. (1de344f)
  • Kotlin:
  • Remove errorprone dependency from kotlin protos. (7b6e828)
  • Csharp:
  • Make json_name take priority over name (fully) in C# parsing (#12262) (4326e0f)
  • Add C# presence methods to proto3 oneof fields. (affadac)
  • Objective-C:
  • Enforce the max message size when serializing to binary form. (e6d01b2)
  • Mark mergeFromData:extensionRegistry: as deprecated. (e3b0051)
  • Python:
  • Fix bug in _internal_copy_files where the rule would fail in downstream repositories. (b36c392)
  • Make numpy/pip_deps a test-only dependency. (fe038fc)
  • Fix Python bug with required fields (579f4ab)
  • Mark deprecated SupportsUnknownEnumValues on Message reflection. Use FieldDescriptor or EnumDescriptor instead. (0b9134b)
  • Raise warnings for MessageFactory class usages (dd9dd86)
  • Add Python support for retention attribute (63389c0)
  • Document known quirks of EnumDescriptor::is_closed() when importing across files with different syntaxes. (1de344f)
  • Python C-Extension (Default):
  • Fix Python bug with required fields (protocolbuffers/upb@ea4cb79)
  • See also UPB changes below, which may affect Python C-Extension (Default).
  • PHP:
  • RepeatedField: unset by index (#11425) (363fa89)
  • PHP C-Extension:
  • RepeatedField: unset by index (#11425) (363fa89)
  • See also UPB changes below, which may affect PHP C-Extension.
  • Ruby:
  • Change the Ruby code generator to emit a serialized proto instead of the DSL (#12319) (bd52d04)
  • Feat(6178): emit ruby enum as integer (#11673) (8aa2b17)
  • Ruby C-Extension:
  • Feat(6178): emit ruby enum as integer (#11673) (8aa2b17)
  • Ruby: Implement Write Barriers (#11793) (d82d8a4)
  • See also UPB changes below, which may affect Ruby C-Extension.
  • UPB (Python/PHP/Ruby C-Extension):
  • Implements upb_Message_DeepClone. (protocolbuffers/upb@3286f94)
  • Other:
  • Fix: missing -DPROTOBUF_USE_DLLS in pkg-config (#12700) (1ca4e9c)
  • Avoid using string(JOIN..., which requires cmake 3.12 (54caf40)
  • Bump Abseil submodule to 20230125.3 (#12660) (750a6e7)
  • Fix btree issue in map tests. (9898418)
  • Fix declared dependencies for pkg-config (#12518) (f79e35c)
  • Fix build for newlib (#12501) (945bf3c)
  • Update usage disclaimer on FieldOptions.ctype (b8e7192)
  • Add config option to print 64-bit integers in JSON as unquoted ints if they can be losslessly converted into a 64-bit float. (330e10d)
  • Version protoc according to the compiler version number. (e67136d)
  • Fix shared object ABI exports (#5144) (#11032) (462964e)
  • Ensure VarintParseSlowArm{32,64} are exported with PROTOBUF_EXPORT (2ce5639)
  • Update the min required CMake version to 3.10 (bcb20bb)

New in Protocol Buffers 3.23.0 RC 3 (May 6, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • C++:
  • Fix(libprotoc): export useful symbols from .so (46fb4aa)
  • Turn off clang::musttail on i386 (b40633f)
  • Python:
  • Fix bug in _internal_copy_files where the rule would fail in downstream repositories. (b36c392)
  • Other:
  • Bump Abseil submodule to 20230125.3 (#12660) (750a6e7)

New in Protocol Buffers 3.22.4 (May 4, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • C++:
  • Fix libprotoc: export useful symbols from .so (860fbf1)
  • Fix btree issue in map tests. (d379c08)
  • Python:
  • Fix bug in _internal_copy_files where the rule would fail in downstream repositories. (859410b)
  • Other:
  • Bump utf8_range to version with working pkg-config (#12584) (b05ee4f)
  • Fix declared dependencies for pkg-config (2c55945)
  • Update abseil dependency and reorder dependencies to ensure we use the version specified in protobuf_deps. (99529a2)
  • Turn off clang::musttail on i386 (5381f40)

New in Protocol Buffers 3.23.0 RC 2 (Apr 29, 2023)

  • Fixes Clang 6 linker bug (49bb3f2)

New in Protocol Buffers 3.23.0 RC 1 (Apr 27, 2023)

  • Announcements:
  • This RC was abandoned before artifact publishing due to unintended breaking changes:
  • [Cpp] lock down visibility for FileDescriptor syntax APIs. (8b1be51)
  • [Java] Lock down visibility for FileDescriptor.getSyntax(). (8c8b2be)
  • [Ruby] Lock down visibility for FileDescriptor.getSyntax(). (8c8b2be)
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Compiler:
  • Implement a retain_options flag in protoc. (83507c7)
  • Make protoc --descriptor_set_out respect option retention (ae2531d)
  • Modify release artifacts for protoc to statically link system libraries. (723bd4c)
  • Extension declaration: Enforce that if the extension range has a declaration then all extensions in that range must be declared. This should prevent non-declared extensions from being added. (5dc171f)
  • Implement "reserved" for extension declaration. (41287bd)
  • Open-source extension declaration definition. (145900f)
  • C++:
  • Breaking change: lock down visibility for FileDescriptor syntax APIs. (8b1be51)
  • Remove PROTOBUF_DEPRECATED in favor of [[deprecated]]. (5c59290)
  • Add assert to the list of keywords for C++. (a75c1a2)
  • Added Reflection::GetCord() method in C++ (6ecb5d0)
  • Support C++ protobuf ctype=CORD for bytes field (generated code). (714f975)
  • Expand LazySerializerEmitter to cover proto3 cases. (fab7f92)
  • Unconditionally generate unknown field accessors. (dd8a3cf)
  • Introduce proto filter for inject_field_listener_events. (2dc5338)
  • Add ParseFromCord to TextFormat (055a6c6)
  • Mark proto2::Arena::GetArena as deprecated. (9f95958)
  • Java:
  • Adds Timestamps.now(). (295f112)
  • Breaking change: Lock down visibility for FileDescriptor.getSyntax(). (8c8b2be)
  • Added Reflection::GetCord() method in C++ (6ecb5d0)
  • Re-attach OSGI headers to lite,core, and util. This information was dropped in the move from maven to bazel. (4b5652b)
  • Add Java FileDescriptor.copyHeadingTo() which copies file-level settings (e.g. syntax, package, file options) to FileDescriptorProto.Builder (6e6d0bc)
  • Remove unnecessary has bits from proto2 Java. (c440da9)
  • Add casts to make protobuf compatible with Java 1.8 runtime. (d40aadf)
  • Fix mutability bug in Java proto lite: sub-messages inside of oneofs were not (fa82155)
  • Document known quirks of EnumDescriptor::is_closed() when importing across files with different syntaxes. (1de344f)
  • Kotlin:
  • Remove errorprone dependency from kotlin protos. (7b6e828)
  • Csharp:
  • Make json_name take priority over name (fully) in C# parsing (#12262) (4326e0f)
  • Add C# presence methods to proto3 oneof fields. (affadac)
  • Objective-C:
  • Enforce the max message size when serializing to binary form. (e6d01b2)
  • mark mergeFromData:extensionRegistry: as deprecated. (e3b0051)
  • Python:
  • Make numpy/pip_deps a test-only dependency. (fe038fc)
  • Mark sequence containers as Py_TPFLAGS_SEQUENCE, enabling pattern matching (a05c57d)
  • Fix Python bug with required fields (579f4ab)
  • Mark deprecated SupportsUnknownEnumValues on Message reflection. Use FieldDescriptor or EnumDescriptor instead. (0b9134b)
  • Raise warnings for MessageFactory class usages (dd9dd86)
  • Add Python support for retention attribute (63389c0)
  • Document known quirks of EnumDescriptor::is_closed() when importing across files with different syntaxes. (1de344f)
  • Python C-Extension (Default):
  • Fix Python bug with required fields (protocolbuffers/upb@ea4cb79)
  • See also UPB changes below, which may affect Python C-Extension (Default).
  • PHP:
  • RepeatedField: unset by index (#11425) (363fa89)
  • PHP C-Extension:
  • RepeatedField: unset by index (#11425) (363fa89)
  • See also UPB changes below, which may affect PHP C-Extension.
  • Ruby:
  • Change the Ruby code generator to emit a serialized proto instead of the DSL (#12319) (bd52d04)
  • Breaking change: Lock down visibility for FileDescriptor.getSyntax(). (8c8b2be)
  • Feat(6178): emit ruby enum as integer (#11673) (8aa2b17)
  • Ruby C-Extension:
  • Feat(6178): emit ruby enum as integer (#11673) (8aa2b17)
  • Ruby: Implement Write Barriers (#11793) (d82d8a4)
  • See also UPB changes below, which may affect Ruby C-Extension.
  • UPB (Python/PHP/Ruby C-Extension):
  • Implements upb_Message_DeepClone. (protocolbuffers/upb@3286f94)
  • Other:
  • Fix btree issue in map tests. (9898418)
  • Fix declared dependencies for pkg-config (#12518) (f79e35c)
  • Fix build for newlib (#12501) (945bf3c)
  • Update usage disclaimer on FieldOptions.ctype (b8e7192)
  • Add config option to print 64-bit integers in JSON as unquoted ints if they can be losslessly converted into a 64-bit float. (330e10d)
  • Version protoc according to the compiler version number. (e67136d)
  • Fix shared object ABI exports (#5144) (#11032) (462964e)
  • Ensure VarintParseSlowArm{32,64} are exported with PROTOBUF_EXPORT (2ce5639)
  • Update the min required CMake version to 3.10 (bcb20bb)

New in Protocol Buffers 3.22.3 (Apr 13, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • UPB (Python/PHP/Ruby C-Extension):
  • Remove src prefix from proto import
  • Other:
  • Fix .gitmodules to use the correct absl branch
  • Remove erroneous dependency on googletest

New in Protocol Buffers 3.22.2 (Mar 11, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Java:
  • Add version to intra proto dependencies and add kotlin stdlib dependency (99ed010)
  • Add $ back for osgi header (d80c12d)
  • Remove $ in pom files (8ac2337)
  • Kotlin:
  • Add version to intra proto dependencies and add kotlin stdlib dependency (99ed010)
  • Remove $ in pom files (8ac2337)

New in Protocol Buffers 3.22.1 (Mar 7, 2023)

  • Announcements:
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Compiler:
  • Modify release artifacts for protoc to statically link system libraries. (8ad6cdd)
  • Add visibility of plugin.proto to python directory (620d21a)
  • Strip "src" from file name of plugin.proto (9c89a70)
  • Java:
  • Add OSGi headers to pom files. (e909bfc)
  • Kotlin:
  • Remove errorprone dependency from kotlin protos. (66f80c3)
  • Other:
  • Version protoc according to the compiler version number. (b143586)

New in Protocol Buffers 3.22.0 (Feb 18, 2023)

  • Announcements:
  • This version includes breaking changes to: Cpp.
  • [Cpp] Migrate to Abseil's logging library. (a9f1ea6)
  • [Cpp] proto2::Map::value_type changes to std::pair<const K, V>. (46656ed)
  • [Cpp] Mark final ZeroCopyInputStream, ZeroCopyOutputStream, and DefaultFieldComparator classes. (bf9c22e)
  • [Cpp] Add a dependency on Abseil (#10416)
  • [Cpp] Remove all autotools usage (#10132)
  • [Cpp] Add C++20 reserved keywords
  • [Cpp] Delete Arena::Init
  • [Cpp] Replace JSON parser with new implementation
  • [Cpp] Make RepeatedField::GetArena non-const in order to support split RepeatedFields.
  • You can refer to our migration guide for details on what C++ code changes will be necessary to be compatible with 22.0.
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Compiler:
  • Breaking change: Migrate to Abseil's logging library. (a9f1ea6)
  • Add debug_redact field option to protobuf. (9238c48)
  • Protoc: accept capital X to indicate hex escape in string literals (#10757)
  • Gracefully handle weird placement of linebreaks around comments (#10660)
  • Open up visibility for some compiler internals (#10608)
  • Protoc: validate reserved names are identifiers (#10586)
  • Protoc: validate custom json_name configuration (#10581)
  • Protoc: fix consistency with parsing very large decimal numbers (#10555)
  • Use protoc version for --version (#10386)
  • Fix for grpc.tools #17995 & protobuf #7474 (handle UTF-8 paths in argumentfile) (#10200)
  • Print full path name of source .proto file on error
  • Include proto message type in the annotation comments.
  • Maven artifact suffix format has changed to -RCN instead of -rc-N
  • C++:
  • Document known quirks of EnumDescriptor::is_closed() when importing across files with different syntaxes. (a594141)
  • Add C++ support for retention attribute (8f882e7)
  • Breaking change: Migrate to Abseil's logging library. (a9f1ea6)
  • No longer define no_threadlocal on OpenBSD (#10610)
  • CMake: Enable projects to set the C++ version (#10464)
  • Breaking Change: Add a dependency on Abseil (#10416)
  • Upgrade third_party/googletest submodule to current main branch (#10393)
  • Breaking Change: Remove all autotools usage (#10132)
  • CMake: use add_compile_options instead of add_definitions for compile options (#10293)
  • Fix #9947: make the ABI identical between debug and non-debug builds (#10271)
  • Allow for CMAKE_INSTALL_LIBDIR to be absolute (#10090)
  • Add header search paths to protobuf-c++ spec (#10024)
  • Cpp_generated_lib_linked support is removed in protoc
  • Reduced .pb.o object file size slightly by explicitly instantiating
  • Breaking Change: Add C++20 reserved keywords.
  • Fixed crash in ThreadLocalStorage for pre-C++17 compilers on 32-bit ARM.
  • Clarified that JSON API non-OK statuses are not a stable API.
  • Added a default implementation of MessageDifferencer::Reporter methods.
  • Proto2::MapPair is now an alias to std::pair.
  • Hide C++ RepeatedField::UnsafeArenaSwap
  • Use table-driven parser for reflection based objects.
  • Add ARM-optimized Varint decoding functions.
  • Minor optimization for parsing groups
  • Declare ReflectiveProtoHook class
  • Reduce size of VarintParse code in protocol buffers, by calling the shared
  • Avoid inlining some large heavily duplicated routines in repeated_ptr_field.h
  • Add ReflectiveProtoHook to Reflection.
  • Turns on table-driven parser for reflection based objects.
  • Save code space by avoiding inlining of large-in-aggregate code-space MessageLite::~MessageLite destructor.
  • Undefine the macro linux when compiling protobuf
  • Reduce memory consumption of MessageSet parsing.
  • Save code space by avoiding inlining of large-in-aggregate code-space MessageLite::~MessageLite destructor.
  • Breaking Change: Delete Arena::Init
  • Make a PROTOBUF_POISON/UNPOISON to reduce noise in the source
  • Put alignment functions in "arena_align.h"
  • Split off cleanup arena functions into "arena_cleanup.h"
  • Fix signed / unsigned match in CHECK_EQ
  • Kill Atomic<>. it's not pulling it's weight
  • Move AllocationPolicy out of arena_impl, and unify arena_config for bazel
  • Fix failure case in table-driven parser.
  • Breaking Change: Replace JSON parser with new implementation
  • Introduce the Printer::{SetRedactDebugString,SetRandomizeDebugString} private flags.
  • Introduce global flags to control Printer::{SetRedactDebugString, SetRandomizeDebugString}.
  • Proto3 string fields no longer trigger clang-tidy warning bugprone-branch-clone.
  • Fix the API of DescriptorUpgrader::set_allow_unknown_dependencies to set to True always, and to populate into the DescriptorPool as well.
  • Report line numbers consistently in text-format deprecated-field warnings.
  • Fixed C++ code generation for protos that use int32_t, uint32_t, int64_t, uint64_t, size_t as field names.
  • Annotate generated C++ public aliases for enum types.
  • Change default arena max block size from 8K to 32K.
  • Begin emitting semantic metadata for some C++ proto features. (2880fef)
  • Java:
  • Document known quirks of EnumDescriptor::is_closed() when importing across files with different syntaxes. (a594141)
  • Use LazyStringArrayList directly in gencode. (e6dd59e)
  • Add Java support for retention attribute (1325913)
  • Expect fail when serialize inf and nan for Value.number_value in json format. fixes #11259 (ca1cb1b)
  • Create a helper function that can make a mutable copy of any ProtobufList (5669606)
  • Add debug_redact field option to protobuf. (9238c48)
  • Remove unused package private class ProtobufLists. (b51c551)
  • Mark UnmodifiableLazyStringList deprecated. UnmodifiableLazyStringList is unnecessary and will be removed in a future release. (9595cbb)
  • Make emptyList public and mark the public EMPTY field as deprecated. (c658e27)
  • Enable Text format parser to skip unknown short-formed repeated fields. (6dbd413)
  • Expose internal setExtension method for Kotlin (33d1070)
  • Mark default instance as immutable first to avoid race during static initialization of default instances. (#10770)
  • Add serialVersionUID to ByteString and subclasses (#10718)
  • Fix serialization warnings in generated code when compiling with Java 18 and above (#10561)
  • Fix Timestamps fromDate for negative 'exact second' java.sql.Timestamps (#10321)
  • Fix Timestamps.fromDate to correctly handle java.sql.Timestamps before unix epoch (#10126)
  • Performance improvement for repeated use of FieldMaskUtil#merge by caching
  • Optimized Java proto serialization gencode for protos having many extension ranges with few fields in between.
  • More thoroughly annotate public generated code in Java lite protocol buffers.
  • Fixed Bug in proto3 java lite repeated enum fields. Failed to call copyOnWrite before modifying previously built message. Causes modification to already "built" messages that should be immutable.
  • Fix Java reflection serialization of empty packed fields.
  • Refactoring java full runtime to reuse sub-message builders and prepare to migrate parsing logic from parse constructor to builder.
  • Move proto wireformat parsing functionality from the private "parsing constructor" to the Builder class.
  • Change the Lite runtime to prefer merging from the wireformat into mutable messages rather than building up a new immutable object before merging. This way results in fewer allocations and copy operations.
  • Make message-type extensions merge from wire-format instead of building up instances and merging afterwards. This has much better performance.
  • Fix TextFormat parser to build up recurring (but supposedly not repeated) sub-messages directly from text rather than building a new sub-message and merging the fully formed message into the existing field.
  • Fix bug in nested builder caching logic where cleared sub-field builders would remain dirty after a clear and build in a parent layer. #10624
  • Add exemplar variants of the Java Any.is() and Any.unpack() methods. (60b7149)
  • Use bit-field int values in buildPartial to skip work on unset groups o...

New in Protocol Buffers 3.22.0 RC 2 (Feb 2, 2023)

  • Announcements:
  • This rc release mainly includes release process fixes since previous -rc1.
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Ruby:
  • Downgrade ruby major version (8ce6ad2)

New in Protocol Buffers 3.22.0 RC 1 (Feb 1, 2023)

  • Announcements:
  • This RC was only published for Java, Protoc, and Cocoapods.
  • This version includes breaking changes to: Cpp, Ruby.
  • [Cpp] Migrate to Abseil's logging library. (a9f1ea6)
  • [Cpp] proto2::Map::value_type changes to std::pair<const K, V>. (46656ed)
  • [Cpp] Mark final ZeroCopyInputStream, ZeroCopyOutputStream, and DefaultFieldComparator classes. (bf9c22e)
  • [Cpp] Add a dependency on Abseil (#10416)
  • [Cpp] Remove all autotools usage (#10132)
  • [Cpp] Add C++20 reserved keywords
  • [Cpp] Delete Arena::Init
  • [Cpp] Replace JSON parser with new implementation
  • [Cpp] Make RepeatedField::GetArena non-const in order to support split RepeatedFields.
  • [Ruby] Switch to releasing ruby source gems only.
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.
  • Compiler:
  • Breaking change: Migrate to Abseil's logging library. (a9f1ea6)
  • Add debug_redact field option to protobuf. (9238c48)
  • Protoc: accept capital X to indicate hex escape in string literals (#10757)
  • Gracefully handle weird placement of linebreaks around comments (#10660)
  • Open up visibility for some compiler internals (#10608)
  • Protoc: validate reserved names are identifiers (#10586)
  • Protoc: validate custom json_name configuration (#10581)
  • Protoc: fix consistency with parsing very large decimal numbers (#10555)
  • Use protoc version for --version (#10386)
  • Fix for grpc.tools #17995 & protobuf #7474 (handle UTF-8 paths in argumentfile) (#10200)
  • Print full path name of source .proto file on error
  • Include proto message type in the annotation comments.
  • C++:
  • Breaking change: Migrate to Abseil's logging library. (a9f1ea6)
  • No longer define no_threadlocal on OpenBSD (#10610)
  • CMake: Enable projects to set the C++ version (#10464)
  • Breaking Change: Add a dependency on Abseil (#10416)
  • Upgrade third_party/googletest submodule to current main branch (#10393)
  • Breaking Change: Remove all autotools usage (#10132)
  • CMake: use add_compile_options instead of add_definitions for compile options (#10293)
  • Fix #9947: make the ABI identical between debug and non-debug builds (#10271)
  • Allow for CMAKE_INSTALL_LIBDIR to be absolute (#10090)
  • Add header search paths to protobuf-c++ spec (#10024)
  • Cpp_generated_lib_linked support is removed in protoc
  • Reduced .pb.o object file size slightly by explicitly instantiating
  • Breaking Change: Add C++20 reserved keywords.
  • Fixed crash in ThreadLocalStorage for pre-C++17 compilers on 32-bit ARM.
  • Clarified that JSON API non-OK statuses are not a stable API.
  • Added a default implementation of MessageDifferencer::Reporter methods.
  • Proto2::MapPair is now an alias to std::pair.
  • Hide C++ RepeatedField::UnsafeArenaSwap
  • Use table-driven parser for reflection based objects.
  • Add ARM-optimized Varint decoding functions.
  • Minor optimization for parsing groups
  • Declare ReflectiveProtoHook class
  • Reduce size of VarintParse code in protocol buffers, by calling the shared
  • Avoid inlining some large heavily duplicated routines in repeated_ptr_field.h
  • Add ReflectiveProtoHook to Reflection.
  • Turns on table-driven parser for reflection based objects.
  • Save code space by avoiding inlining of large-in-aggregate code-space MessageLite::~MessageLite destructor.
  • Undefine the macro linux when compiling protobuf
  • Reduce memory consumption of MessageSet parsing.
  • Save code space by avoiding inlining of large-in-aggregate code-space MessageLite::~MessageLite destructor.
  • Breaking Change: Delete Arena::Init
  • Make a PROTOBUF_POISON/UNPOISON to reduce noise in the source
  • Put alignment functions in "arena_align.h"
  • Split off cleanup arena functions into "arena_cleanup.h"
  • Fix signed / unsigned match in CHECK_EQ
  • Kill Atomic<>. it's not pulling it's weight
  • Move AllocationPolicy out of arena_impl, and unify arena_config for bazel
  • Fix failure case in table-driven parser.
  • Breaking Change: Replace JSON parser with new implementation
  • Introduce the Printer::{SetRedactDebugString,SetRandomizeDebugString} private flags.
  • Introduce global flags to control Printer::{SetRedactDebugString, SetRandomizeDebugString}.
  • Proto3 string fields no longer trigger clang-tidy warning bugprone-branch-clone.
  • Fix the API of DescriptorUpgrader::set_allow_unknown_dependencies to set to True always, and to populate into the DescriptorPool as well.
  • Report line numbers consistently in text-format deprecated-field warnings.
  • Fixed C++ code generation for protos that use int32_t, uint32_t, int64_t, uint64_t, size_t as field names.
  • Annotate generated C++ public aliases for enum types.
  • Change default arena max block size from 8K to 32K.
  • Begin emitting semantic metadata for some C++ proto features. (2880fef)
  • Java:
  • Expect fail when serialize inf and nan for Value.number_value in json format. fixes #11259 (ca1cb1b)
  • Create a helper function that can make a mutable copy of any ProtobufList (5669606)
  • Add debug_redact field option to protobuf. (9238c48)
  • Remove unused package private class ProtobufLists. (b51c551)
  • Mark UnmodifiableLazyStringList deprecated. UnmodifiableLazyStringList is unnecessary and will be removed in a future release. (9595cbb)
  • Make emptyList public and mark the public EMPTY field as deprecated. (c658e27)
  • Enable Text format parser to skip unknown short-formed repeated fields. (6dbd413)
  • Expose internal setExtension method for Kotlin (33d1070)
  • Mark default instance as immutable first to avoid race during static initialization of default instances. (#10770)
  • Add serialVersionUID to ByteString and subclasses (#10718)
  • Fix serialization warnings in generated code when compiling with Java 18 and above (#10561)
  • Fix Timestamps fromDate for negative 'exact second' java.sql.Timestamps (#10321)
  • Fix Timestamps.fromDate to correctly handle java.sql.Timestamps before unix epoch (#10126)
  • Performance improvement for repeated use of FieldMaskUtil#merge by caching
  • Optimized Java proto serialization gencode for protos having many extension ranges with few fields in between.
  • More thoroughly annotate public generated code in Java lite protocol buffers.
  • Fixed Bug in proto3 java lite repeated enum fields. Failed to call copyOnWrite before modifying previously built message. Causes modification to already "built" messages that should be immutable.
  • Fix Java reflection serialization of empty packed fields.
  • Refactoring java full runtime to reuse sub-message builders and prepare to migrate parsing logic from parse constructor to builder.
  • Move proto wireformat parsing functionality from the private "parsing constructor" to the Builder class.
  • Change the Lite runtime to prefer merging from the wireformat into mutable messages rather than building up a new immutable object before merging. This way results in fewer allocations and copy operations.
  • Make message-type extensions merge from wire-format instead of building up instances and merging afterwards. This has much better performance.
  • Fix TextFormat parser to build up recurring (but supposedly not repeated) sub-messages directly from text rather than building a new sub-message and merging the fully formed message into the existing field.
  • Fix bug in nested builder caching logic where cleared sub-field builders would remain dirty after a clear and build in a parent layer. #10624
  • Add exemplar variants of the Java Any.is() and Any.unpack() methods. (60b7149)
  • Use bit-field int values in buildPartial to skip work on unset groups of fields. (2326aef)
  • Kotlin:
  • Add debug_redact field option to protobuf. (9238c48)
  • Expose internal setExtension method for Kotlin (33d1070)
  • Add missing public modifier to Kotlin generated code (#10616)
  • Add "public" modifier to Kotlin generated code (#10599)
  • Update rules_kotlin version (#10212)
  • Suppress deprecation warnings in Kotlin generated code.
  • Kotlin generated code comments now use kdoc format instead of javadoc.
  • Escape keywords in package names in proto generated code
  • Add Kotlin enum int value getters and setters
  • Csharp:
  • Make the MergeFrom method of type ReadOnlySequence public (#11124) (c4bac67)
  • Fix a bug in which a possibly invalidated swisstable reference is used. (5c5dcdd)
  • Fix .NET Native AOT warnings in Protobuf reflection (#11128) (c019a79)
  • Use forward slash instead of backslash in nuspec file (#11449) (724250d)
  • Add debug_redact field option to protobuf. (9238c48)
  • Expose internal setExtension method for Kotlin (33d1070)
  • Apply Obsolete attribute to deprecated enums and enum values in C# generated code (#10520)
  • Fix 32-bit floating point JSON parsing of maximal values for C# (#10514)
  • Retain existing array in RepeatedField.Clear (#10508)
  • Implement IComparable for the Duration type (C#) (#10441)
  • Implement correct map merging behavior for C# (#10339)
  • Support indented JSON formatting in C# (#9391)
  • Disambiguate generated properties in C# (#10269)
  • Bugfix/issue 8101 (#10268)
  • Expose plugin protos for C# (#10244)
  • Update to C# 10 and upgrade code style (#10105)
  • Fix failing FieldMask.Merge for well-known wrapper field types (#9602)
  • Helper method on Any to allow an any to be unpacked more easily (#9695)
  • Objective-C:
  • [ObjC] Boolean generation options support no value as "true". (7935932)
  • [ObjC] Put out of range closed enum extension values in unknown fields. (903639c)
  • [ObjC] Raise the min OS versions (and required Xcode) (#10652)
  • [ObjC] Provide a protocol for GPBExtensionRegistry's lookup support. (#10597)
  • Mark the syntax on GPBFileDescriptor as deprecated. (c79832b)
  • Add the concept of a "closed enum" and expose it from the GPBEnumDescriptor. (7bb699b)
  • Python:
  • Soft deprecate python MessageFactory (c80e7ef)
  • Add debug_redact field option to protobuf. (9238c48)
  • Raise errors when serialize inf and nan for Value.number_value in json format. fixes #11259 (883ec1c)
  • Resolve #10949: use raise from in json_format.py (#10966) (1e6f876)
  • Allow reserved enums to be negative (1f58f1d)
  • Make generated python files compatible with Cython (#11011) (9aa5272)
  • Raise KeyError in Python ServiceDescriptor.FindMethodByName (#9592) (#9998)
  • Changes ordering of printed fields in .pyi files from lexicographic to the same ordering found in the proto descriptor.
  • Adds GeneratedCodeInfo annotations to python proto .pyi outputs as a base64 encoded docstring in the last line of the .pyi file for code analysis tools.
  • Fix message factory's behavior in python cpp extension to return same message classes for same descriptor, even if the factories are different.
  • Add type annotation for enum value fields in enum classes.
  • Update sphinx 2.3.1 to 3.0.4 (c1a42b3)
  • Added is_closed to EnumDescriptor in protobuf python (da9de8d)
  • Python C-Extension (Default):
  • Add license file to pypi wheels. (protocolbuffers/upb@92dbe4b)
  • Append "ByDef" to names of message accessors that use reflection (protocolbuffers/upb@b747edb)
  • Implement upb_Map_Next() as the new upb_Map iterator (protocolbuffers/upb@03b1dee)
  • Move the wire type definitions into upb/wire/ where they belong (protocolbuffers/upb@ff6439f)
  • Replace and repair the integer hash table iterator: (protocolbuffers/upb@7056646)
  • Add Parse/Serialize templates to support shared_ptr/unique_ptr. (protocolbuffers/upb@d3ec4b6)
  • Fixes protocolbuffers/upb#869 (protocolbuffers/upb@41017ef)
  • Silently succeed when adding the same serialized file in Python (protocolbuffers/upb@e779b9d)
  • Different message factories will return same message class for same descriptor in python. (protocolbuffers/upb@470f06c)
  • Make upb numpy type checks consistent with pure python and cpp. (protocolbuffers/upb@79b735a)
  • Upb: fix NULL pointer bug in Python FFI (protocolbuffers/upb@c2c6427)
  • See also UPB changes below, which may affect Python C-Extension (Default).
  • PHP:
  • Fix: php 8.2 dynamic property warning in MapFieldIter (#11485) (8e636d5)
  • Chore: fix php lint (#11417) (ade256e)
  • Add debug_redact field option to protobuf. (9238c48)
  • [PHP]Added missing files and fix phpext_protobuf_ptr export in pecl version (#10689)
  • [PHP] Fix empty message serialization for Any (#10595)
  • [PHP] allow dynamic properties in Message (#10594)
  • [PHP] Added getContainingOneof and getRealContainingOneof to descriptor. (#10356)
  • Fix: PHP readonly legacy files for nested messages (#10320)
  • Migrating macos php builds from 7.0/7.3 to 7.4/8.0 (#10274)
  • Exposed more functions in FieldDescriptor and OneofDescriptor. (#10102)
  • Fixed PHP SEGV by not writing to shared memory for zend_class_entry. (#9995)
  • Feat: [PHP] remove legacy generate class file (#9621)
  • PHP C-Extension:
  • Add debug_redact field option to protobuf. (9238c48)
  • Update PHP and Ruby to use the new accessors, delete the old ones (3f36a91)
  • Update Ruby to use the newer upb_Map_Next() iterator (8809a11)
  • Fix the ruby and php builds which were broken by a recent upb change (9cdf347)
  • See also UPB changes below, which may affect PHP C-Extension.
  • Ruby:
  • Breaking Change: Switch to releasing ruby source gems only. (0daf8b8)
  • Migrate ruby release targets to genrule to work around Bazel 5 bug (#11619) (e207bcd)
  • Add ruby release targets (#11468) (5b27b4f)
  • Remove support for ruby 2.5. (4958971)
  • Add debug_redact field option to protobuf. (9238c48)
  • Update PHP and Ruby to use the new accessors, delete the old ones (3f36a91)
  • Replace libc strdup usage with internal impl to restore musl compat. (#10811)
  • Auto capitalize enums name in Ruby (#10454)
  • Ruby: Use class inheritance to save memory (#10281)
  • Ruby: use a valid instance variable name for descriptor (#10282)
  • Ruby C-Extension:
  • Add retention and target field options in descriptor.proto (5a56837)
  • Add ruby release targets (#11468) (5b27b4f)
  • Add debug_redact field option to protobuf. (9238c48)
  • Update PHP and Ruby to use the new accessors, delete the old ones (3f36a91)
  • Hide ruby native extension symbols on FreeBSD (#10832) (2a73e3b)
  • Update Ruby to use the newer upb_Map_Next() iterator (8809a11)
  • See also UPB changes below, which may affect Ruby C-Extension.
  • UPB (Python/PHP/Ruby C-Extension):
  • Expect fail when serialize inf and nan for Value.number_value in json format. fixes #11259 (protocolbuffers/upb@651550c)
  • Add ::protos::Parse template for Ptr. (protocolbuffers/upb@b5384af)
  • Upb_Array_Resize() now correctly clears new values (protocolbuffers/upb@02cf7aa)
  • Fix unset mini table field presence bug (protocolbuffers/upb@9ab09b4)
  • Allow reserved enums to be negative (protocolbuffers/upb@1b0b06f)
  • Fix UPB_LIKELY() for 32-bit Windows builds (protocolbuffers/upb@9582dc2)
  • Fix C compiler failure when there are fields names prefixed with accessor prefixes such as set_ and clear_. (protocolbuffers/upb@d76e286631eb89b621be)
  • Make upb backwards and forwards compatible with Bazel 4.x, 3.5.x and LTS (protocolbuffers/upb@04957b1)
  • Other:
  • Upgrade to Abseil LTS 20230117 (#11622) (7930cd1)
  • Fixed Visual Studio 2022: protobufsrcgoogleprotobufarena.cc(457,51): error C2127: 'thread_cache_': illegal initialization of 'constinit' entity with a non-constant expression #11672 (#11674) (c2e99a1)
  • Clean up a few issues with ARM-optimized varint decoding. (bbe2e68)
  • Fix bool parser for map entries to look at the whole 64-bit varint and not just (43e5937)
  • Breaking Change: proto2::Map::value_type changes to std::pair<const K, V>. (46656ed)
  • Breaking Change: Mark final ZeroCopyInputStream, ZeroCopyOutputStream, and DefaultFieldComparator classes. (bf9c22e)
  • Deprecate repeated field cleared elements API. (84d8b00)
  • Breaking change: Make RepeatedField::GetArena non-const in order to support split RepeatedFields. (514c9a8)
  • Add EpsCopyInputStream::ReadCord() providing an efficient direct Cord API (bc4c156)
  • Add static asserts to container classes. (5a8abe1)
  • Fix proto deserialization issue when parsing a packed repeated enum field whose (afdf6da)
  • Use the "shldq" decoder for the specialized 64-bit Varint parsers, rather than (0ca97a1)
  • Use @utf8_range to reference //third_party/utf8_range (#11352) (2dcd7d8)
  • Place alignas() before lifetime specifiers (#11248) (5712e1a)
  • Add UnknownFieldSet::SerializeToCord() (8661e45)
  • Add support for repeated Cord fields. (b97005b)
  • Add Cord based Parse and Serialize logic to MessageLite (ddde013)
  • Add 'ReadCord and 'WriteCord functions to CodedStream (e5e2ad8)
  • Add CordInputStream and CordOutputStream providing stream support directly from/to Cord data (8afd1b6)
  • Add a WriteCord() method to ZeroCopyInputStream (192cd09)
  • Unify string and cord cleanup nodes in TaggedNode (0783c82)
  • Open source google/protobuf/bridge/message_set.proto (c04f842)
  • FileOutputStream: Properly pass block_size to CopyingOutputStreamAdaptor (1b1e399)
  • Implement ZeroCopyInputStream::ReadCord() in terms of absl::CordBuffer (75d31be)
  • Changing bazel skylib version from 1.2.1 to 1.3.0 (#10979) (1489e8d)
  • Update zlib to 1.2.13. (#10786)
  • Make jsoncpp a formal dependency (#10739)
  • Upgrade to MSVC 2017, since 2015 is no longer supported (#10437)
  • Update CMake configuration to add a dependency on Abseil (#10401)
  • Use release version instead of libtool version in Makefile (#10355)
  • Fix missing google::protobuf::RepeatedPtrField<std::string> issue in GCC (225b936)

New in Protocol Buffers 3.21.12 (Dec 14, 2022)

  • Fix broken enum ranges (#11171)
  • Stop requiring extension fields to have a sythetic oneof (#11091)
  • Python runtime 4.21.10 not works generated code can not load valid proto.
  • (#11171)

New in Protocol Buffers 3.21.11 (Dec 8, 2022)

  • Add license file to pypi wheels (#10936)
  • Fix round-trip bug (#10158)

New in Protocol Buffers 3.21.10 (Dec 1, 2022)

  • Java:
  • Use bit-field int values in buildPartial to skip work on unset groups of fields. (#10960)
  • Mark nested builder as clean after clear is called (#10984)
  • UPB:
  • Fix UPB_LIKELY() for 32-bit Windows builds; update protobuf_deps to point to the current upb 21.x (#11028)
  • Other:
  • Add public modifiers to kotlin code (#11068)

New in Protocol Buffers 3.21.9 (Oct 26, 2022)

  • C++
  • Update zlib to 1.2.13 (#10819)
  • Python
  • Target MacOS 10.9 to fix #10799 (#10807)
  • Ruby
  • Replace libc strdup usage with internal impl to restore musl compat (#10818)

New in Protocol Buffers 3.21.8 (Oct 18, 2022)

  • C++:
  • 21.x No longer define no_threadlocal on OpenBSD (#10743)
  • Java:
  • Mark default instance as immutable first to avoid race during static initialization of default instances (#10771)
  • Ruby:
  • Auto capitalize enums name in Ruby (#10454) (#10763)

New in Protocol Buffers 3.21.7 (Sep 30, 2022)

  • Refactoring java full runtime to reuse sub-message builders and prepare to
  • migrate parsing logic from parse constructor to builder.
  • Move proto wireformat parsing functionality from the private "parsing
  • constructor" to the Builder class.
  • Change the Lite runtime to prefer merging from the wireformat into mutable
  • messages rather than building up a new immutable object before merging. This
  • way results in fewer allocations and copy operations.
  • Make message-type extensions merge from wire-format instead of building up
  • instances and merging afterwards. This has much better performance.
  • Fix TextFormat parser to build up recurring (but supposedly not repeated)
  • sub-messages directly from text rather than building a new sub-message and
  • merging the fully formed message into the existing field.

New in Protocol Buffers 3.21.6 (Sep 15, 2022)

  • C++:
  • Reduce memory consumption of MessageSet parsing

New in Protocol Buffers 3.21.5 (Aug 10, 2022)

  • PHP:
  • Added getContainingOneof and getRealContainingOneof to descriptor.
  • fix PHP readonly legacy files for nested messages
  • Python:
  • Fixed comparison of maps in Python.

New in Protocol Buffers 3.21.4 (Jul 26, 2022)

  • C++:
  • Reduce the required alignment of ArenaString from 8 to 4 (#10298)

New in Protocol Buffers 3.21.3 (Jul 21, 2022)

  • 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)

New in Protocol Buffers 3.21.2 Pre-release (Jun 24, 2022)

  • C++:
  • ArenaString improvements (fix alignment issue)
  • PHP:
  • API changes for OneOf (#10102)

New in Protocol Buffers 3.21.1 (May 28, 2022)

  • 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)

New in Protocol Buffers 3.21.0 (May 26, 2022)

  • 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)

New in Protocol Buffers 3.21.0 RC 2 (May 20, 2022)

  • 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

New in Protocol Buffers 3.21.0 RC 1 (May 12, 2022)

  • Versions:
  • Versioning scheme is changing to decouple major versions for languages
  • Minor and patch versions will remain coupled
  • Compilers and releases will refer to the version as just the minor and micro versions (i.e. 21.0)
  • See here for more information on this change
  • 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.
  • 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)
  • 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
  • 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

New in Protocol Buffers 3.20.1 (May 1, 2022)

  • PHP:
  • Fix building packaged PHP extension (#9727)
  • Fixed composer.json to only advertise compatibility with PHP 7.0+. (#9819)
  • Ruby:
  • Disable the aarch64 build on macOS until it can be fixed. (#9816)
  • Other:
  • Fix versioning issues in 3.20.0

New in Protocol Buffers 3.20.1 RC 1 (Apr 6, 2022)

  • PHP:
  • Fix building packaged PHP extension (#9727)
  • Other:
  • Fix versioning issues in 3.20.0

New in Protocol Buffers 3.20.0 (Apr 5, 2022)

  • C++:
  • Add option to use external GTest in CMake (#8736)
  • cmake: Set correct sonames for libprotobuf-lite.so and libprotoc.so (#8635) (#9529)
  • Java:
  • Revert "Standardize on Array copyOf" (#9400)
  • Resolve more java field accessor name conflicts (#8198)
  • Python:
  • Pin multibuild scripts to get manylinux1 wheels back (#9216)
  • Dropped support for Python < 3.7 (#9480)
  • PHP:
  • fix: [PHP] add missing reserved classnames (#9458)
  • Ruby:
  • Dropped Ruby 2.3 and 2.4 support for CI and releases. (#9311)
  • [Ruby] Message.decode/encode: Add max_recursion_depth option (#9218)
  • Ruby: rename max_recursion_depth to recursion_limit (#9486)
  • Fix conversion of singleton classes in Ruby (#9342)
  • Suppress warning for intentional circular require (#9556)
  • [Ruby] allow encode json options to be an object that responds to to_hash (#9513)
  • Other:
  • [C#] Fix trim warnings (#9182)
  • Add protoc-gen-go-svc to options.md (#9280)
  • Fixes NullReferenceException when accessing FieldDescriptor.IsPacked (#9430)
  • Add ToProto() method to all C# descriptor classes (#9426)
  • Add cmake option protobuf_INSTALL to not install files (#7123)
  • [CMake] Allow custom plugin options e.g. to generate mocks (#9105)
  • Add an option to preserve proto names in JsonFormatter (#6307)
  • Add test scope to kotlin-test for protobuf-kotlin-lite (#9518)
  • Add prefix_to_proto_package_mappings_path ObjC option. (#9498)
  • [ObjC] Rename proto_package_to_prefix_mappings_path to package_to_prefix_mappings_path. (#9552)
  • cmake: Use linker version scripts (#9545)
  • Add a generation option to control use of forward declarations in headers. (#9568)
  • [C#] fix parse failure for extensions with large field numbers (#9591)

New in Protocol Buffers 3.20.0 Pre-release (Mar 26, 2022)

  • C++:
  • Add option to use external GTest in CMake (#8736)
  • cmake: Set correct sonames for libprotobuf-lite.so and libprotoc.so (#8635) (#9529)
  • Java:
  • Revert "Standardize on Array copyOf" (#9400)
  • Resolve more java field accessor name conflicts (#8198)
  • Python:
  • Pin multibuild scripts to get manylinux1 wheels back (#9216)
  • Dropped support for Python < 3.7 (#9480)
  • PHP:
  • fix: [PHP] add missing reserved classnames (#9458)
  • Ruby:
  • Dropped Ruby 2.3 and 2.4 support for CI and releases. (#9311)
  • [Ruby] Message.decode/encode: Add max_recursion_depth option (#9218)
  • Ruby: rename max_recursion_depth to recursion_limit (#9486)
  • Fix conversion of singleton classes in Ruby (#9342)
  • Suppress warning for intentional circular require (#9556)
  • [Ruby] allow encode json options to be an object that responds to to_hash (#9513)
  • Other:
  • [C#] Fix trim warnings (#9182)
  • Add protoc-gen-go-svc to options.md (#9280)
  • Fixes NullReferenceException when accessing FieldDescriptor.IsPacked (#9430)
  • Add ToProto() method to all C# descriptor classes (#9426)
  • Add cmake option protobuf_INSTALL to not install files (#7123)
  • [CMake] Allow custom plugin options e.g. to generate mocks (#9105)
  • Add an option to preserve proto names in JsonFormatter (#6307)
  • Add test scope to kotlin-test for protobuf-kotlin-lite (#9518)
  • Add prefix_to_proto_package_mappings_path ObjC option. (#9498)
  • [ObjC] Rename proto_package_to_prefix_mappings_path to package_to_prefix_mappings_path. (#9552)
  • cmake: Use linker version scripts (#9545)
  • Add a generation option to control use of forward declarations in headers. (#9568)
  • [C#] fix parse failure for extensions with large field numbers (#9591)

New in Protocol Buffers 3.20.0 RC 2 (Mar 17, 2022)

  • Use dedicated helper functions for map descriptors by @acozzette in #9099
  • Prevent integer overflow for unknown fields in Python by @roehling in #7016
  • Add GetDebugString to Python FileDescriptor interface. by @psobot in #7498
  • Merge 3.18.x into master by @acozzette in #9109
  • Python: fix usages of deprecated assertRaisesRegexp by @acozzette in #9098
  • Update maven-surefire-plugin to 3.0.0-M5. by @cpovirk in #7830
  • Suppress dot-delimiter warning if ruby_package consists of a single component by @qnighy in #7276
  • Fix Python 3.10 C++ tests by @acozzette in #9128
  • Reserve extension id range for protoc-gen-checker by @upils in #9133
  • Merge 3.19.x into master by @acozzette in #9136
  • Make IsDescriptor* helpers lenient about descriptor name by @acozzette in #9127
  • examples: update Go example by @neild in #7217
  • Fix distcheck test by updating example Go file paths by @acozzette in #9137
  • Fix wkt dupes by @perezd in #8942
  • [Python] Provide a type alias ValueType on EnumTypeWrapper for mypy-protobuf compatibility by @nipunn1313 in #8182
  • Fix grammatical error in the descriptor protobuf definition by @Inconnu08 in #9151
  • for windows build fail issue, confliction with std max by @appledragon in #9144
  • Transition to NIO StandardCharsets by @belugabehr in #9148
  • JS: Fixed ReferenceError: window is not defined by @MarnixBouhuis in #9156
  • [Ruby] Fix memory leak in MessageClass.encode by @peterzhu2118 in #9150
  • Update checked-in C# generated code by @acozzette in #9158
  • for old clang build issue, related with https://reviews.llvm.org/D12375 by @appledragon in #9159
  • Fix comment syntax in any.proto by @chrisbainbridge in #8792
  • Improvement: better ruby from_* support in well_known_types.rb by @jufemaiz in #8254
  • Standardize on Array copyOf by @belugabehr in #9162
  • Remove unittest2 imports by @thisch in #9171
  • Fix benchmark by making sure we use Python 3 by @acozzette in #9170
  • Add pbkit to third_party.md by @disjukr in #9177
  • Merge 3.19.x into master by @acozzette in #9169
  • Implement unambiguous comparisons for RepeatedPtrIterator in C++20 by @mumbleskates in #9139
  • Use repo-relative labels wherever possible by @Wyverald in #9187
  • Creates a protoc release zip by @perezd in #9188
  • Update our build script to publish Mac aarch_64 binaries by @acozzette in #9203
  • Remove unnecessary dependency from @com_google_protobuf//:protobuf_java_util by @eikemeier in #9195
  • Creating bazel toolchains to compile for macOS. by @deannagarcia in #9210
  • [C++] Fix missing #ifdef for undefined identifiers by @rpvela in #9201
  • Fix typo in docstring by @tomerv in #9208
  • [C#] Update .NET SDKs to LTS versions by @JamesNK in #9205
  • Changing cpp version back to 8 by @deannagarcia in #9214
  • Update BUILD paths by @deannagarcia in #9217
  • Fix .NET SourceLink and warnings in NuGet package by @JamesNK in #8466
  • Fix dotnet aarch64 by @jtattermusch in #9222
  • Update BUILD paths by @deannagarcia in #9224
  • Update BUILD by @deannagarcia in #9226
  • Update include directories by @deannagarcia in #9227
  • Change sysroot flags by @deannagarcia in #9235
  • Add a envvar to provide a prefix on all proto package prefixed symbols. by @thomasvl in #9233
  • Support no_package:FILE in the expected prefixes file. by @thomasvl in #9234
  • Update BUILD by @deannagarcia in #9242
  • Update BUILD by @deannagarcia in #9243
  • Update toolchains.bazelrc by @deannagarcia in #9244
  • Adding windows toolchains by @deannagarcia in #9250
  • Remove unused includes from unit tests by @acozzette in #9251
  • Use C++11 integer types and fully qualify std::string by @acozzette in #9253
  • Name protoc artifacts by their cpu and os by @deannagarcia in #9252
  • delete unused files by @elharo in #9262
  • remove UTF8Utils class that hasn't been needed since Java 6 by @elharo in #9266
  • No error throwing for unknown OS by @deannagarcia in #9267
  • [C#] Fix trim warnings by @JamesNK in #9182
  • Small tweaks to C# unit tests by @acozzette in #9271
  • Fixing windows builds by @deannagarcia in #9276
  • Change include directories by @deannagarcia in #9277
  • Add comma by @deannagarcia in #9278
  • Add protoc-gen-go-svc to options.md by @dane in #9280
  • Fix broken max macro on Windows by @Kerisa in #9273
  • Dropped Ruby 2.3 and 2.4 support for CI and releases. by @haberman in #9311
  • show less log junk from Maven by @elharo in #9309
  • remove unused test proto by @elharo in #9298
  • Add space to fix error message formatting. by @thomasvl in #9316
  • Change windows cross compile includes by @deannagarcia in #9317
  • Change toolchain includes by @deannagarcia in #9318
  • Project import generated by Copybara by @copybara-service in #9333
  • Pin multibuild scripts to get manylinux1 wheels back by @jtattermusch in #9216
  • fix spelling errors by @elharo in #9368
  • Fix Ruby release build by pinning rake-compiler-dock version by @acozzette in #9372
  • Improve performance of parsing unknown fields in Java by @acozzette in #9371
  • Default two more of the options from env variables. by @thomasvl in #9376
  • update GSON to 2.8.9 by @elharo in #9367
  • BUILD: Set protoc binary file mode to 0555 in release archive by @LINKIWI in #9354
  • Update, fix, or delete an assortment of broken links by @elharo in #9381
  • Revert "Transition to NIO StandardCharsets" by @elharo in #9382
  • restore Android API level 14 compatibility by @elharo in #9386
  • restore even more Android API level 14 compatibility by @elharo in #9388
  • turn on animal-sniffer by @elharo in #9383
  • Update protojure link by @ghaskins in #9389
  • Revert "Standardize on Array copyOf" by @acozzette in #9400
  • Merge 3.19.x into master by @acozzette in #9402
  • Update CHANGES.txt to include recent Java security advisory by @acozzette in #9403
  • Add $(nproc) to make documentation by @aminvakil in #9360
  • remove Proto2MessageLiteInfoFactory and Proto3MessageLiteInfoFactory by @elharo in #9407
  • Adding kotlin bazel tests by @deannagarcia in #9408
  • Update location of llvm-ar in bazel toolchain by @deannagarcia in #9429
  • Migrate kotlin bazel tests from kt_jvm_test by @deannagarcia in #9428
  • Use constexpr for FieldTypeClass by @gjasny in #9434
  • link with correct C runtime on MSVC by @r2d3 in #9437
  • Updated Ruby to the current version of upb by @haberman in #9436
  • Use proper SPDX license identifier by @Shortfinga in #9441
  • simplify mergeable UI messages by @elharo in #9445
  • Disable [[clang::musttail]] attribute on Windows x86 by @ngg in #9422
  • Add ToProto() method to all C# descriptor classes by @jskeet in #9426
  • Must build project before running benchmarks by @elharo in #9454
  • Merge 3.19.x into master by @acozzette in #9452
  • Selectively add source or gen dir to includes. by @comius in #9438
  • Fixes NullReferenceException when accessing FieldDescriptor.IsPacked by @xoofx in #9430
  • Update package.xml by @deannagarcia in #9459
  • Fix checking Windows platform with preprocessor by @Biswa96 in #9460
  • Use matching soname when building with CMake as Makefile by @mrjoel in #9178
  • Add cmake option protobuf_INSTALL to not install files by @jcooky in #7123
  • fixing php 8.1 deprecation warnings by @brettmc in #9370
  • [cleanup] Msvc warnings by @stephenatwork in #9263
  • Match service argument names to abstract interface by @nipunn1313 in #9418
  • Resolve more java field accessor name conflicts by @philsttr in #8198
  • add test for clone of non-empty message by @elharo in #9193
  • [CMAKE] protobuf::libprotoc and protobuf::protoc should be optional in legacy protobuf-module.cmake when crossing compiling. by @owent in #9307
  • for ios shared library export api visibility by @appledragon in #9160
  • Enable testing via CTest by @florin-crisan in #8737
  • Add option to use external GTest in CMake by @florin-crisan in #8736
  • objective-c: Add default_objc_class_prefix generation option. by @dnkoutso in #9476
  • Dropped support for Python < 3.7 by @haberman in #9480
  • Integrate from Piper for C++, Java, and Python by @haberman in #9479
  • Integrate from Piper for C++, Java, and Python by @haberman in #9482
  • [CMake] Allow custom plugin options e.g. to generate mocks by @tiolan in #9105
  • [Ruby] Message.decode/encode: Add max_recursion_depth option by @lfittl in #9218
  • Ignore Eclipse metafiles by @elharo in #9485
  • Ruby: rename max_recursion_depth to recursion_limit by @acozzette in #9486
  • fix: use E_USER_ERROR for trigger_error calls by @dwsupplee in #9462
  • fix: [PHP] add missing reserved classnames by @bshaffer in #9458
  • Added Embedded Proto to options.md by @BartHertog in #9493
  • Fix conversion of singleton classes in Ruby by @antstorm in #9342
  • #9293 - incompatible return type php 8.1 by @oleg1540 in #9301
  • Add an option to preserve proto names in JsonFormatter by @ObsidianMinor in #6307
  • Fix the benchmark job and delete old Python configs by @acozzette in #9497
  • Fixing Kotlin tests by @deannagarcia in #9494
  • Remove Proto3LiteTest.kt by @deannagarcia in #9496
  • Add protoc-gen-fieldmask to third-party doc by @idodod in #9505
  • Use internal kotlin gen rule by @deannagarcia in #9508
  • Changes to build aarch64 under manylinux. by @haberman in #9510
  • Add test scope to kotlin-test for protobuf-kotlin-lite by @alexvanyo in #9518
  • Integrate from Piper for C++, Java, and Python by @dlj-NaN in #9522
  • Change sysroot flags by @deannagarcia in #9524
  • Integrate from Piper for C++, Java, and Python by @dlj-NaN in #9525
  • Integrate from Piper for C++, Java, and Python by @dlj-NaN in #9528
  • Revert "objective-c: Add default_objc_class_prefix generation option." by @dnkoutso in #9532
  • cmake: Set correct sonames for libprotobuf-lite.so and libprotoc.so (#8635) by @Arfrever in #9529
  • Add prefix_to_proto_package_mappings_path ObjC option. by @dnkoutso in #9498
  • Rename ExpectedPrefixesCollector to PackageToPrefixesCollector by @thomasvl in #9544
  • Make the ObjC support conditional to darwin. by @thomasvl in #9543
  • Fix package naming rule by @deannagarcia in #9537
  • [ObjC] Rename proto_package_to_prefix_mappings_path to package_to_prefix_mappings_path. by @dnkoutso in #9552
  • Make protoc executable names consistent by @deannagarcia in #9553
  • Update JRuby 9.2.19.0 -> 9.2.20.1 and 9.3.0.0 to 9.3.3.0. by @JasonLunn in #9549
  • Fix update_version.py script by @acozzette in #9554
  • chore: gitignore ephemeral files that clangd uses by @devjgm in #9555
  • Change toolchain artifact name patterns by @deannagarcia in #9558
  • ObjC Generation/Validation Options Cleanups by @thomasvl in #9559
  • Add bazel rules to do Kotlin mvn exports by @deannagarcia in #9560
  • Simplify imports of the WKTs within the library itself. by @thomasvl in #9565
  • Suppress warning for intentional circular require by @ntkme in #9556
  • cmake: Use linker version scripts by @Arfrever in #9545
  • Integrate from Piper for C++, Java, and Python by @acozzette in #9570
  • [editors/emacs] Fix protobuf-mode definition by @kunhtkun in #9572
  • Add a generation option to control use of forward declarations in headers. by @thomasvl in #9568
  • Integrate from Piper for C++, Java, and Python by @acozzette in #9576
  • Update protobuf version to 3.20.0-rc1 by @acozzette in #9579
  • Lower minimum CMake version to 3.5 by @acozzette in #9580
  • Update CHANGES.txt for 3.20.0 release by @acozzette in #9581
  • Updated PHP upb, and utf8_range for Ruby/PHP by @haberman in #9585
  • adding php81 support to release notes by @brettmc in #9590
  • [C#] fix parse failure for extensions with large field numbers by @homuler in #9591
  • CMake fixes by @Arfrever in #9595
  • Add ruby_upb_alloc using xrealloc/xfree so Ruby GC is aware of allocated memory for Arenas. by @zhangskz in #9586
  • [Ruby] allow encode json options to be an object that responds to to_hash by @lukad in #9513
  • Merge master into 3.20.x by @acozzette in #9588
  • [PHP] Remove unnecessary zval initialization by @zeriyoshi in #9600
  • Merge 3.20.x into master by @acozzette in #9604
  • Rename main cmake/CMakeLists.txt to CMakeLists.txt by @Arfrever in #9603
  • Replace gradle plugin by @oneiros-de in #9611
  • avoid allocating memory if all extension are cleared by @liuzhijiang in #9345
  • clean up language by @elharo in #9577
  • Changing toolchain build file by @deannagarcia in #9610
  • [PHP] fix PHP build system by @zeriyoshi in #9571
  • cmake: Call get_filename_component() with DIRECTORY mode instead of PATH mode by @Arfrever in #9614
  • Enable GeneratedDescriptorTest.EnormousDescriptor test for GCC/Clang CMake builds by @Arfrever in #9617
  • Updated Ruby to the latest upb. by @haberman in #9589
  • Removing toolchain_dir variable by @deannagarcia in #9628
  • Add alternative instructions for Homebrew users. by @JasonLunn in #9638
  • Toolchain cleanups by @deannagarcia in #9640

New in Protocol Buffers 3.20.0 RC 1 (Mar 5, 2022)

  • Ruby:
  • Dropped Ruby 2.3 and 2.4 support for CI and releases. (#9311)
  • Message.decode/encode: Add max_recursion_depth option (#9218)
  • Rename max_recursion_depth to recursion_limit (#9486)
  • Fix conversion of singleton classes in Ruby (#9342)
  • Suppress warning for intentional circular require (#9556)
  • JSON will now output shorter strings for double and float fields when possible
  • without losing precision.
  • Encoding and decoding of binary format will now work properly on big-endian
  • systems.
  • UTF-8 verification was fixed to properly reject surrogate code points.
  • Unknown enums for proto2 protos now properly implement proto2's behavior of
  • putting such values in unknown fields.
  • Java:
  • Revert "Standardize on Array copyOf" (#9400)
  • Resolve more java field accessor name conflicts (#8198)
  • Don't support map fields in DynamicMessage.Builder.{getFieldBuilder,getRepeatedFieldBuilder}
  • Fix parseFrom to only throw InvalidProtocolBufferException
  • InvalidProtocolBufferException now allows arbitrary wrapped Exception types.
  • Fix bug in FieldSet.Builder.mergeFrom
  • Flush CodedOutputStream also flushes underlying OutputStream
  • When oneof case is the same and the field type is Message, merge the
  • subfield. (previously it was replaced.)’
  • Add @CheckReturnValue to some protobuf types
  • Report original exceptions when parsing JSON
  • Add more info to @deprecated javadoc for set/get/has methods
  • Fix initialization bug in doc comment line numbers
  • Fix comments for message set wire format.
  • Kotlin:
  • Add test scope to kotlin-test for protobuf-kotlin-lite (#9518)
  • Add orNull extensions for optional message fields.
  • Add orNull extensions to all proto3 message fields.
  • Python:
  • Dropped support for Python < 3.7 (#9480)
  • Protoc is now able to generate python stubs (.pyi) with --pyi_out
  • Pin multibuild scripts to get manylinux1 wheels back (#9216)
  • Fix type annotations of some Duration and Timestamp methods.
  • Repeated field containers are now generic in field types and could be used
  • in type annotations.
  • Protobuf python generated codes are simplified. Descriptors and message
  • classes' definitions are now dynamic created in internal/builder.py.
  • Insertion Points for messages classes are discarded.
  • has_presence is added for FieldDescriptor in python
  • Loosen indexing type requirements to allow valid index() implementations
  • rather than only PyLongObjects.
  • Fix the deepcopy bug caused by not copying message_listener.
  • Added python JSON parse recursion limit (default 100)
  • Path info is added for python JSON parse errors
  • Pure python repeated scalar fields will not able to pickle. Convert to list
  • first.
  • Timestamp.ToDatetime() now accepts an optional tzinfo parameter. If
  • specified, the function returns a timezone-aware datetime in the given time
  • zone. If omitted or None, the function returns a timezone-naive UTC datetime
  • (as previously).
  • Adds client_streaming and server_streaming fields to MethodDescriptor.
  • Add "ensure_ascii" parameter to json_format.MessageToJson. This allows smaller
  • JSON serializations with UTF-8 or other non-ASCII encodings.
  • Added experimental support for directly assigning numpy scalars and array.
  • Improve the calculation of public_dependencies in DescriptorPool.
  • Compiler:
  • Migrate IsDefault(const std::string*) and UnsafeSetDefault(const std::string*)
  • Implement strong qualified tags for TaggedPtr
  • Rework allocations to power-of-two byte sizes.
  • Migrate IsDefault(const std::string*) and UnsafeSetDefault(const std::string*)
  • Implement strong qualified tags for TaggedPtr
  • Make TaggedPtr Set...() calls explicitly spell out the content type.
  • Check for parsing error before verifying UTF8.
  • Enforce a maximum message nesting limit of 32 in the descriptor builder to
  • guard against stack overflows
  • Fixed bugs in operators for RepeatedPtrIterator
  • Assert a maximum map alignment for allocated values
  • Fix proto1 group extension protodb parsing error
  • Do not log/report the same descriptor symbol multiple times if it contains
  • more than one invalid character.
  • Add UnknownFieldSet::SerializeToString and SerializeToCodedStream.
  • Remove explicit default pointers and deprecated API from protocol compiler
  • Arenas:
  • Change Repeated*Field to reuse memory when using arenas.
  • Implements pbarenaz for profiling proto arenas
  • Introduce CreateString() and CreateArenaString() for cleaner semantics
  • Fix unreferenced parameter for MSVC builds
  • Add UnsafeSetAllocated to be used for one-of string fields.
  • Make Arena::AllocateAligned() a public function.
  • Determine if ArenaDtor related code generation is necessary in one place.
  • Implement on demand register ArenaDtor for InlinedStringField
  • C++:
  • Enable testing via CTest (#8737)
  • Add option to use external GTest in CMake (#8736)
  • CMake: Set correct sonames for libprotobuf-lite.so and libprotoc.so (#8635) (#9529)
  • Add cmake option protobuf_INSTALL to not install files (#7123)
  • CMake: Allow custom plugin options e.g. to generate mocks (#9105)
  • CMake: Use linker version scripts (#9545)
  • Manually *struct Cord fields to work better with arenas.
  • Manually destruct map fields.
  • Generate narrower code
  • Fix #9378 by removing
  • shadowed cached_size field
  • Remove GetPointer() and explicit nullptr defaults.
  • Add proto_h flag for speeding up large builds
  • Add missing overload for reference wrapped fields.
  • Add MergedDescriptorDatabase::FindAllFileNames()
  • RepeatedField now defines an iterator type instead of using a pointer.
  • Remove obsolete macros GOOGLE_PROTOBUF_HAS_ONEOF and GOOGLE_PROTOBUF_HAS_ARENAS.
  • PHP:
  • Fix: add missing reserved classnames (#9458)
  • C#:
  • Fix trim warnings (#9182)
  • Fixes NullReferenceException when accessing FieldDescriptor.IsPacked (#9430)
  • Add ToProto() method to all descriptor classes (#9426)
  • Add an option to preserve proto names in JsonFormatter (#6307)
  • Objective-C:
  • Add prefix_to_proto_package_mappings_path option. (#9498)
  • Rename proto_package_to_prefix_mappings_path to package_to_prefix_mappings_path. (#9552)
  • Add a generation option to control use of forward declarations in headers. (#9568)

New in Protocol Buffers 3.19.4 (Jan 28, 2022)

  • Python:
  • Make libprotobuf symbols local on OSX to fix issue #9395 (#9435)
  • Ruby:
  • Fixed a data loss bug that could occur when the number of optional fields in a message is an exact multiple of 32. (#9440).
  • PHP:
  • Fixed a data loss bug that could occur when the number of optional fields in a message is an exact multiple of 32.

New in Protocol Buffers 3.19.3 (Jan 11, 2022)

  • Fix missing Windows wheel for Python 3.10 on PyPI

New in Protocol Buffers 3.19.2 (Jan 5, 2022)

  • Python:
  • Fix missing Windows wheel for Python 3.10 on PyPI
  • Java:
  • Improve performance characteristics of UnknownFieldSet parsing (#9371)

New in Protocol Buffers 3.19.1 (Oct 29, 2021)

  • Bazel:
  • Ensure that release archives contain everything needed for Bazel (#9131)
  • Align dependency handling with Bazel best practices (#9165)
  • JavaScript:
  • Fix ReferenceError: window is not defined when getting the global object (#9156)
  • Ruby:
  • Fix memory leak in MessageClass.encode (#9150)

New in Protocol Buffers 3.19.0 (Oct 21, 2021)

  • C++:
  • Make proto2::Message::DiscardUnknownFields() non-virtual
  • Separate RepeatedPtrField into its own header file
  • For default floating point values of 0, consider all bits significant
  • cmake: support MSVC_RUNTIME_LIBRARY property (#8851)
  • Fix shadowing warnings (#8926)
  • Fix for issue #8484, constant initialization doesn't compile in msvc clang-cl environment (#8993)
  • Fix build on AIX and SunOS (#8373) (#9065)
  • Add Android stlport and default toolchains to BUILD. (#8290)
  • Java:
  • For default floating point values of 0, consider all bits significant
  • Annotate //java/com/google/protobuf/util/... with nullness annotations
  • Use ArrayList copy constructor (#7853)
  • Kotlin:
  • Switch Kotlin proto DSLs to be implemented with inline value classes
  • Fixing inlining and deprecation for repeated string fields (#9120)
  • Python:
  • Proto2 DecodeError now includes message name in error message
  • Make MessageToDict convert map keys to strings (#8122)
  • Add python-requires in setup.py (#8989)
  • Add python 3.10 (#9034)
  • JavaScript:
  • Skip exports if not available by CommonJS (#8856)
  • JS: Comply with CSP no-unsafe-eval. (#8864)
  • PHP:
  • Added "object" as a reserved name for PHP (#8962)
  • Ruby:
  • Override Map.clone to use Map's dup method (#7938)
  • Ruby: build extensions for arm64-darwin (#8232)
  • Add class method Timestamp.from_time to ruby well known types (#8562)
  • Adopt pure ruby DSL implementation for JRuby (#9047)
  • Add size to Map class (#8068)
  • Fix for descriptor_pb.rb: google/protobuf should be required first (#9121)
  • C#:
  • Correctly set ExtensionRegistry when parsing with MessageParser, but using an already existing CodedInputStream (#7246)
  • [C#] Make FieldDescriptor propertyName public (#7642)

New in Protocol Buffers 3.19.0 RC 2 (Oct 19, 2021)

  • Update changelog to reflect that we are not yet dropping Java 7 support after all

New in Protocol Buffers 3.19.0 RC 1 (Oct 17, 2021)

  • C++:
  • Make proto2::Message::DiscardUnknownFields() non-virtual
  • Separate RepeatedPtrField into its own header file
  • For default floating point values of 0, consider all bits significant
  • cmake: support MSVC_RUNTIME_LIBRARY property (#8851)
  • Fix shadowing warnings (#8926)
  • Fix for issue #8484, constant initialization doesn't compile in msvc clang-cl environment (#8993)
  • Fix build on AIX and SunOS (#8373) (#9065)
  • Add Android stlport and default toolchains to BUILD. (#8290)
  • Java:
  • This release drops support for Java 7. Use 3.18.x if you still need Java 7 support.
  • For default floating point values of 0, consider all bits significant
  • Annotate //java/com/google/protobuf/util/... with nullness annotations
  • Use ArrayList copy constructor (#7853)
  • Kotlin:
  • Switch Kotlin proto DSLs to be implemented with inline value classes
  • Python:
  • Proto2 DecodeError now includes message name in error message
  • Make MessageToDict convert map keys to strings (#8122)
  • Add python-requires in setup.py (#8989)
  • Add python 3.10 (#9034)
  • JavaScript:
  • Skip exports if not available by CommonJS (#8856)
  • JS: Comply with CSP no-unsafe-eval. (#8864)
  • PHP:
  • Added "object" as a reserved name for PHP (#8962)
  • Ruby:
  • Override Map.clone to use Map's dup method (#7938)
  • Ruby: build extensions for arm64-darwin (#8232)
  • Add class method Timestamp.from_time to ruby well known types (#8562)
  • Adopt pure ruby DSL implementation for JRuby (#9047)
  • Add size to Map class (#8068)
  • C#:
  • Correctly set ExtensionRegistry when parsing with MessageParser, but using an already existing CodedInputStream (#7246)
  • [C#] Make FieldDescriptor propertyName public (#7642)

New in Protocol Buffers 3.18.1 (Oct 5, 2021)

  • Python:
  • Update setup.py to reflect that we now require at least Python 3.5 (#8989)
  • Performance fix for DynamicMessage: force GetRaw() to be inlined (#9023)
  • Ruby:
  • Update ruby_generator.cc to allow proto2 imports in proto3 (#9003)

New in Protocol Buffers 3.18.0 (Sep 15, 2021)

  • C++:
  • Fix warnings raised by clang 11 (#8664)
  • Make StringPiece constructible from std::string_view (#8707)
  • Add missing capability attributes for LLVM 12 (#8714)
  • Stop using std::iterator (deprecated in C++17). (#8741)
  • Move field_access_listener from libprotobuf-lite to libprotobuf (#8775)
  • Fix #7047 Safely handle setlocale (#8735)
  • Remove deprecated version of SetTotalBytesLimit() (#8794)
  • Support arena allocation of google::protobuf::AnyMetadata (#8758)
  • Fix undefined symbol error around SharedCtor() (#8827)
  • Fix default value of enum(int) in json_util with proto2 (#8835)
  • Better Smaller ByteSizeLong
  • Introduce event filters for inject_field_listener_events
  • Reduce memory usage of DescriptorPool
  • For lazy fields copy serialized form when allowed.
  • Re-introduce the InlinedStringField class
  • v2 access listener
  • Reduce padding in the proto's ExtensionRegistry map.
  • GetExtension performance optimizations
  • Make tracker a static variable rather than call static functions
  • Support extensions in field access listener
  • Annotate MergeFrom for field access listener
  • Fix incomplete types for field access listener
  • Add map_entry/new_map_entry to SpecificField in MessageDifferencer. They
  • record the map items which are different in MessageDifferencer's reporter.
  • Reduce binary size due to fieldless proto messages
  • TextFormat: ParseInfoTree supports getting field end location in addition to
  • start.
  • Fix repeated enum extension size in field listener
  • Enable Any Text Expansion for Descriptors::DebugString()
  • Switch from int{8,16,32,64} to int{8,16,32,64}_t
  • Java:
  • Fix errorprone conflict (#8723)
  • Removing deprecated TimeUtil class. (#8749)
  • Optimized FieldDescriptor.valueOf() to avoid array copying.
  • Removing deprecated TimeUtil class.
  • Add Durations.parseUnchecked(String) and Timestamps.parseUnchecked(String)
  • FieldMaskUtil: Add convenience method to mask the fields out of a given proto.
  • JavaScript:
  • Optimize binary parsing of repeated float64
  • Fix for optimization when reading doubles from binary wire format
  • Replace toArray implementation with toJSON.
  • PHP:
  • Migrate PHP & Ruby to ABSL wyhash (#8854)
  • Added support for PHP 8.1 (currently in RC1) to the C extension (#8964)
  • Fixed PHP SEGV when constructing messages from a destructor. (#8969)
  • Ruby:
  • Move DSL implementation from C to pure Ruby (#8850)
  • Fixed a memory bug with RepeatedField#+. (#8970)
  • Python:
  • Drops support for 2.7 and 3.5.
  • Other:
  • [csharp] ByteString.CreateCodedInput should use ArraySegment offset and count (#8740)
  • [ObjC] Add support for using the proto package to prefix symbols. (#8760)
  • field_presence.md: fix Go example (#8788)

New in Protocol Buffers 3.18.0 RC 2 (Sep 1, 2021)

  • C++:
  • Fix warnings raised by clang 11 (#8664)
  • Make StringPiece constructible from std::string_view (#8707)
  • Add missing capability attributes for LLVM 12 (#8714)
  • Stop using std::iterator (deprecated in C++17). (#8741)
  • Move field_access_listener from libprotobuf-lite to libprotobuf (#8775)
  • Fix #7047 Safely handle setlocale (#8735)
  • Remove deprecated version of SetTotalBytesLimit((#8794)
  • Support arena allocation of google::protobuf::AnyMetadata (#8758)
  • Fix undefined symbol error around SharedCtor((#8827)
  • Fix default value of enum(intin json_util with proto2 (#8835)
  • Better Smaller ByteSizeLong
  • Introduce event filters for inject_field_listener_events
  • Reduce memory usage of DescriptorPool
  • For lazy fields copy serialized form when allowed.
  • Re-introduce the InlinedStringField class
  • v2 access listener
  • Reduce padding in the proto's ExtensionRegistry map.
  • GetExtension performance optimizations
  • Make tracker a static variable rather than call static functions
  • Support extensions in field access listener
  • Annotate MergeFrom for field access listener
  • Fix incomplete types for field access listener
  • Add map_entry/new_map_entry to SpecificField in MessageDifferencer. They
  • record the map items which are different in MessageDifferencer's reporter.
  • Reduce binary size due to fieldless proto messages
  • TextFormat: ParseInfoTree supports getting field end location in addition to
  • start.
  • Fix repeated enum extension size in field listener
  • Enable Any Text Expansion for Descriptors::DebugString()
  • Switch from int{8,16,32,64} to int{8,16,32,64}_t
  • Java:
  • Fix errorprone conflict (#8723)
  • Removing deprecated TimeUtil class. (#8749)
  • Optimized FieldDescriptor.valueOf(to avoid array copying.
  • Removing deprecated TimeUtil class.
  • Add Durations.parseUnchecked(Stringand Timestamps.parseUnchecked(String)
  • FieldMaskUtil: Add convenience method to mask the fields out of a given proto.
  • JavaScript:
  • Optimize binary parsing of repeated float64
  • Fix for optimization when reading doubles from binary wire format
  • Replace toArray implementation with toJSON.
  • PHP:
  • Migrate PHP & Ruby to ABSL wyhash (#8854)
  • Ruby:
  • Move DSL implementation from C to pure Ruby (#8850)
  • Python:
  • Drops support for 2.7 and 3.5.
  • Other:
  • [csharp] ByteString.CreateCodedInput should use ArraySegment offset and count (#8740)
  • [ObjC] Add support for using the proto package to prefix symbols. (#8760)
  • field_presence.md: fix Go example (#8788)

New in Protocol Buffers 3.18.0 RC 1 (Aug 20, 2021)

  • C++:
  • Fix warnings raised by clang 11 (#8664)
  • Make StringPiece constructible from std::string_view (#8707)
  • Add missing capability attributes for LLVM 12 (#8714)
  • Stop using std::iterator (deprecated in C++17). (#8741)
  • Move field_access_listener from libprotobuf-lite to libprotobuf (#8775)
  • Fix #7047 Safely handle setlocale (#8735)
  • Remove deprecated version of SetTotalBytesLimit() (#8794)
  • Support arena allocation of google::protobuf::AnyMetadata (#8758)
  • Fix undefined symbol error around SharedCtor() (#8827)
  • Fix default value of enum(int) in json_util with proto2 (#8835)
  • Better Smaller ByteSizeLong
  • Introduce event filters for inject_field_listener_events
  • Reduce memory usage of DescriptorPool
  • For lazy fields copy serialized form when allowed.
  • Re-introduce the InlinedStringField class
  • v2 access listener
  • Reduce padding in the proto's ExtensionRegistry map.
  • GetExtension performance optimizations
  • Make tracker a static variable rather than call static functions
  • Support extensions in field access listener
  • Annotate MergeFrom for field access listener
  • Fix incomplete types for field access listener
  • Add map_entry/new_map_entry to SpecificField in MessageDifferencer. They
  • record the map items which are different in MessageDifferencer's reporter.
  • Reduce binary size due to fieldless proto messages
  • TextFormat: ParseInfoTree supports getting field end location in addition to
  • start.
  • Fix repeated enum extension size in field listener
  • Enable Any Text Expansion for Descriptors::DebugString()
  • Switch from int{8,16,32,64} to int{8,16,32,64}_t
  • Java:
  • Fix errorprone conflict (#8723)
  • Removing deprecated TimeUtil class. (#8749)
  • Optimized FieldDescriptor.valueOf() to avoid array copying.
  • Removing deprecated TimeUtil class.
  • Add Durations.parseUnchecked(String) and Timestamps.parseUnchecked(String)
  • FieldMaskUtil: Add convenience method to mask the fields out of a given proto.
  • JavaScript:
  • Optimize binary parsing of repeated float64
  • Fix for optimization when reading doubles from binary wire format
  • Replace toArray implementation with toJSON.
  • PHP:
  • Migrate PHP & Ruby to ABSL wyhash (#8854)
  • Ruby:
  • Move DSL implementation from C to pure Ruby (#8850)
  • Other:
  • [csharp] ByteString.CreateCodedInput should use ArraySegment offset and count (#8740)
  • [ObjC] Add support for using the proto package to prefix symbols. (#8760)
  • field_presence.md: fix Go example (#8788)

New in Protocol Buffers 3.17.3 (Jun 8, 2021)

  • C++:
  • Introduce FieldAccessListener.
  • Stop emitting boilerplate {Copy/Merge}From in each ProtoBuf class
  • Fixed some uninitialized variable warnings in generated_message_reflection.cc.
  • Kotlin:
  • Fix duplicate proto files error (#8699)
  • Java:
  • Fixed parser to check that we are at a proper limit when a sub-message has
  • finished parsing.
  • General:
  • Support M1 (#8557)

New in Protocol Buffers 3.17.2 (Jun 3, 2021)

  • Kotlin:
  • Fix duplicate class error (#8653)
  • PHP:
  • Fixed SEGV in sub-message getters for well-known types when message is unset

New in Protocol Buffers 3.17.1 (May 25, 2021)

  • PHP:
  • Fixed PHP memory leaks and arginfo errors. (#8614)
  • Fixed JSON parser to allow multiple values from the same oneof as long as all but one are null.
  • Ruby:
  • Fixed memory bug: properly root repeated/map field when assigning. (#8639)
  • Fixed JSON parser to allow multiple values from the same oneof as long as all but one are null.

New in Protocol Buffers 3.17.0 (May 13, 2021)

  • Protocol Compiler:
  • Fix the generated source information for reserved values in Enums.
  • C++:
  • Fix -Wunused-parameter in map<string, int> fields (fixes #8494) (#8500)
  • Use byteswap.h when building against musl libc (#8503)
  • Fix -Wundefined-inline error when using SharedCtor() or SharedDtor() (#8532)
  • Fix bug where Descriptor::DebugString() printed proto3 synthetic oneofs.
  • Provide stable versions of SortAndUnique().
  • Make sure to cache proto3 optional message fields when they are cleared.
  • Expose UnsafeArena methods to Reflection.
  • Use std::string::empty() rather than std::string::size() > 0.
  • Kotlin:
  • Restrict extension setter and getter operators to non-nullable T.
  • Java:
  • updating GSON and Guava to more recent versions (#8524)
  • Reduce the time spent evaluating isExtensionNumber by storing the extension
  • ranges in a TreeMap for faster queries. This is particularly relevant for
  • protos which define a large number of extension ranges, for example when
  • each tag is defined as an extension.
  • Fix java bytecode estimation logic for optional fields.
  • Optimize Descriptor.isExtensionNumber.
  • Python:
  • Add MethodDescriptor.CopyToProto() (#8327)
  • Remove unused python_protobuf.{cc,h} (#8513)
  • Start publishing python aarch64 manylinux wheels normally (#8530)
  • Fix constness issue detected by MSVC standard conforming mode (#8568)
  • Make JSON parsing match C++ and Java when multiple fields from the same
  • oneof are present and all but one is null.
  • Ruby:
  • Add support for proto3 json_name in compiler and field definitions (#8356)
  • Fixed memory leak of Ruby arena objects. (#8461)
  • Fix source gem compilation (#8471)
  • Fix various exceptions in Ruby on 64-bit Windows (#8563)
  • Fix crash when calculating Message hash values on 64-bit Windows (#8565)
  • Conformance Tests:
  • Added a conformance test for the case of multiple fields from the same
  • oneof.
  • Other:
  • Open sourcing kotlin protos (#8272)
  • Use a newer version of rules_proto, with the new rule proto_descriptor_set (#8469)

New in Protocol Buffers 3.17.0 RC 2 (May 11, 2021)

  • Update protobuf version
  • Updated Kotlin versions and updated script to handle them

New in Protocol Buffers 3.17.0 RC 1 (May 8, 2021)

  • Protocol Compiler:
  • Fix the generated source information for reserved values in Enums
  • C++:
  • Fix -Wunused-parameter in map<string, int> fields (fixes #8494) (#8500)
  • Use byteswaph when building against musl libc (#8503)
  • Fix -Wundefined-inline error when using SharedCtor() or SharedDtor() (#8532)
  • Fix bug where Descriptor::DebugString() printed proto3 synthetic oneofs
  • Provide stable versions of SortAndUnique()
  • Make sure to cache proto3 optional message fields when they are cleared
  • Expose UnsafeArena methods to Reflection
  • Use std::string::empty() rather than std::string::size() > 0
  • Kotlin:
  • Restrict extension setter and getter operators to non-nullable T
  • Java:
  • updating GSON and Guava to more recent versions (#8524)
  • Reduce the time spent evaluating isExtensionNumber by storing the extension
  • ranges in a TreeMap for faster queries This is particularly relevant for
  • protos which define a large number of extension ranges, for example when
  • each tag is defined as an extension
  • Fix java bytecode estimation logic for optional fields
  • Optimize DescriptorisExtensionNumber
  • Python:
  • [python-runtime] Add MethodDescriptorCopyToProto() (#8327)
  • Remove unused python_protobuf{cc,h} (#8513)
  • Start publishing python aarch64 manylinux wheels normally (#8530)
  • Fix constness issue detected by MSVC standard conforming mode (#8568)
  • Make JSON parsing match C++ and Java when multiple fields from the same
  • oneof are present and all but one is null
  • Ruby:
  • Ruby: Add support for proto3 json_name in compiler and field definitions (#8356)
  • Fixed memory leak of Ruby arena objects (#8461)
  • Fix source gem compilation (#8471)
  • fix(ruby): Fix various exceptions in Ruby on 64-bit Windows (#8563)
  • fix(ruby): Fix crash when calculating Message hash values on 64-bit Windows (#8565)
  • Conformance Tests:
  • Added a conformance test for the case of multiple fields from the same
  • oneof
  • Other:
  • Opensourcing kotlin protos (#8272)
  • Use a newer version of rules_proto, with the new rule proto_descriptor_set (#8469)

New in Protocol Buffers 3.16.0 (May 7, 2021)

  • C++:
  • Fix compiler warnings issue found in conformance_test_runner #8189 (#8190)
  • Fix MinGW-w64 build issues. (#8286)
  • [Protoc] C++ Resolved an issue where NO_DESTROY and CONSTINIT are in incorrect order (#8296)
  • Fix PROTOBUF_CONSTINIT macro redefinition (#8323)
  • Delete StringPiecePod (#8353)
  • Fix gcc error: comparison of unsigned expression in '>= 0' is always … (#8309)
  • Fix cmake install on iOS (#8301)
  • Create a CMake option to control whether or not RTTI is enabled (#8347)
  • Fix endian.h location on FreeBSD (#8351)
  • Refactor util::Status (#8354)
  • Make util::Status more similar to absl::Status (#8405)
  • Fix -Wsuggest-destructor-override for generated C++ proto classes. (#8408)
  • Refactor StatusOr and StringPiece (#8406)
  • Refactor uint128 (#8416)
  • The ::pb namespace is no longer exposed due to conflicts.
  • Allow MessageDifferencer::TreatAsSet() (and friends) to override previous
  • calls instead of crashing.
  • Reduce the size of generated proto headers for protos with string or
  • bytes fields.
  • Move arena() operation on uncommon path to out-of-line routine
  • For iterator-pair function parameter types, take both iterators by value.
  • Code-space savings and perhaps some modest performance improvements in
  • RepeatedPtrField.
  • Eliminate nullptr check from every tag parse.
  • Remove unused _$name$cached_byte_size fields.
  • Serialize extension ranges together when not broken by a proto field in the
  • middle.
  • Do out-of-line allocation and deallocation of string object in ArenaString.
  • Streamline ParseContext::ParseMessage to avoid code bloat and improve
  • performance.
  • New member functions RepeatedField::Assign, RepeatedPtrField::{Add, Assign}.
  • Fix undefined behavior warning due to innocuous uninitialization of value
  • on an error path.
  • Avoid expensive inlined code space for encoding message length for messages
  • = 128 bytes and instead do a procedure call to a shared out-of-line routine.
  • util::DefaultFieldComparator will be final in a future version of protobuf.
  • Subclasses should inherit from SimpleFieldComparator instead.
  • C#:
  • Add .NET 5 target and improve WriteString performance with SIMD (#8147)
  • Java
  • deps: update JUnit and Truth (#8319)
  • Detect invalid overflow of byteLimit and return InvalidProtocolBufferException as documented.
  • Exceptions thrown while reading from an InputStream in parseFrom are now
  • included as causes.
  • Support potentially more efficient proto parsing from RopeByteStrings.
  • Clarify runtime of ByteString.Output.toStringBuffer().
  • Added UnsafeByteOperations to protobuf-lite (#8426)
  • JavaScript:
  • Make Any.pack() chainable.
  • Python:
  • Fix some constness / char literal issues being found by MSVC standard conforming mode (#8344)
  • Switch on "new" buffer API (#8339)
  • Enable crosscompiling aarch64 python wheels under dockcross manylinux docker image (#8280)
  • Fixed a bug in text format where a trailing colon was printed for repeated field.
  • When TextFormat encounters a duplicate message map key, replace the current
  • one instead of merging.
  • Objective-C:
  • Move the class map to a CFDictionary. (#8328)
  • PHP:
  • read_property() handler is not supposed to return NULL (#8362)
  • Changed parameter type from long to integer (#7613)
  • fix: README supported PHP version for C extension (#8236)
  • Ruby:
  • Fixed quadratic memory usage when appending to arrays. (#8364)
  • Fixed memory leak of Ruby arena objects. (#8461)
  • Add support for proto3 json_name in compiler and field definitions. (#8356)
  • Other:
  • Some doc on AOT compilation and protobuf (#8294)
  • [CMake] Ability to pass options to protoc executable from cmake (#8374)
  • Add --fatal_warnings flag to treat warnings as errors (#8131)
  • [bazel] Remove deprecated way to depend on googletest (#8396)
  • add error returns missing from protoc to prevent it from exiting with… (#8409)

New in Protocol Buffers 3.16.0 RC 2 (May 6, 2021)

  • Ruby:
  • Fixed memory leak of Ruby arena objects. (#8462)
  • Add support for proto3 json_name in compiler and field definitions. (#8356)

New in Protocol Buffers 3.15.8 (Apr 8, 2021)

  • Fixed memory leak of Ruby arena objects (#8461)

New in Protocol Buffers 3.15.7 (Apr 3, 2021)

  • C++:
  • Remove the ::pb namespace (alias) (#8423)
  • Ruby:
  • Fix unbounded memory growth for Ruby <2.7 (#8429)
  • Fixed message equality in cases where the message type is different (#8434)

New in Protocol Buffers 3.15.6 (Mar 11, 2021)

  • Ruby:
  • Fixed bug in string comparison logic (#8386)

New in Protocol Buffers 3.15.5 (Mar 5, 2021)

  • Ruby:
  • Fixed quadratic memory use in array append (#8379)
  • PHP:
  • Fixed quadratic memory use in array append (#8379)
  • C++:
  • Do not disable RTTI by default in the CMake build (#8377)

New in Protocol Buffers 3.15.4 (Mar 4, 2021)

  • Ruby:
  • Fixed SEGV when users pass nil messages (#8363)
  • Fixed quadratic memory usage when appending to arrays (#8364)
  • C++:
  • Create a CMake option to control whether or not RTTI is enabled (#8361)
  • PHP:
  • read_property() handler is not supposed to return NULL (#8362)

New in Protocol Buffers 3.15.3 (Feb 26, 2021)

  • Ruby <2.7 now uses WeakMap too, which prevents memory leaks. (#8341)

New in Protocol Buffers 3.15.2 (Feb 24, 2021)

  • Ruby:
  • Fix for FieldDescriptor.get(msg) (#8330)
  • C++:
  • Fix PROTOBUF_CONSTINIT macro redefinition (#8323)

New in Protocol Buffers 3.15.1 (Feb 20, 2021)

  • Ruby:
  • Bugfix for Message.[] for repeated or map fields (#8313)
  • Fix for truncating behavior when converting Float to Duration (#8320)
  • C++:
  • Small fixes for MinGW and for C++20 with GCC (#8318)

New in Protocol Buffers 3.15.0 (Feb 19, 2021)

  • Protocol Compiler:
  • Optional fields for proto3 are enabled by default, and no longer require the --experimental_allow_proto3_optional flag.
  • C++:
  • MessageDifferencer: fixed bug when using custom ignore with multiple unknown fields
  • Use init_seg in MSVC to push initialization to an earlier phase.
  • Runtime no longer triggers -Wsign-compare warnings.
  • Fixed -Wtautological-constant-out-of-range-compare warning.
  • DynamicCastToGenerated works for nullptr input for even if RTTI is disabled
  • Arena is refactored and optimized.
  • Clarified/specified that the exact value of Arena::SpaceAllocated() is an implementation detail users must not rely on. It should not be used in unit tests.
  • Change the signature of Any::PackFrom() to return false on error.
  • Add fast reflection getter API for strings.
  • Constant initialize the global message instances
  • Avoid potential for missed wakeup in UnknownFieldSet
  • Now Proto3 Oneof fields have "has" methods for checking their presence in C++.
  • Bugfix for NVCC
  • Return early in _InternalSerialize for empty maps.
  • Adding functionality for outputting map key values in proto path logging output (does not affect comparison logic) and stop printing 'value' in the path. The modified print functionality is in the
  • MessageDifferencer::StreamReporter.
  • Fixed #8129
  • Ensure that null char symbol, package and file names do not result in a crash.
  • Constant initialize the global message instances
  • Pretty print 'max' instead of numeric values in reserved ranges.
  • Removed remaining instances of std::is_pod, which is deprecated in C++20.
  • Changes to reduce code size for unknown field handling by making uncommon cases out of line.
  • Fix std::is_pod deprecated in C++20 (#7180)
  • Fix some -Wunused-parameter warnings (#8053)
  • Fix detecting file as directory on zOS issue #8051 (#8052)
  • Don't include sys/param.h for _BYTE_ORDER (#8106)
  • remove CMAKE_THREAD_LIBS_INIT from pkgconfig CFLAGS (#8154)
  • Fix TextFormatMapTest.DynamicMessage issue#5136 (#8159)
  • Fix for compiler warning issue#8145 (#8160)
  • fix: support deprecated enums for GCC < 6 (#8164)
  • Fix some warning when compiling with Visual Studio 2019 on x64 target (#8125)
  • Python:
  • Provided an override for the reverse() method that will reverse the internal collection directly instead of using the other methods of the BaseContainer.
  • MessageFactory.CreateProtoype can be overridden to customize class creation.
  • Fix PyUnknownFields memory leak (#7928)
  • Add macOS big sur compatibility (#8126)
  • JavaScript:
  • Generate getDescriptor methods with * as their this type.
  • Enforce let/const for generated messages.
  • js/binary/utils.js: Fix jspb.utils.joinUnsignedDecimalString to work with negative bitsLow and low but non-zero bitsHigh parameter. (#8170)
  • PHP:
  • Added support for PHP 8. (#8105)
  • unregister INI entries and fix invalid read on shutdown (#8042)
  • Fix PhpDoc comments for message accessors to include "|null". (#8136)
  • fix: convert native PHP floats to single precision (#8187)
  • Fixed PHP to support field numbers >=2**28. (#8235)
  • feat: add support for deprecated fields to PHP compiler (#8223)
  • Protect against stack overflow if the user derives from Message. (#8248)
  • Fixed clone for Message, RepeatedField, and MapField. (#8245)
  • Updated upb to allow nonzero offset minutes in JSON timestamps. (#8258)
  • Ruby:
  • Added support for Ruby 3. (#8184)
  • Rewrote the data storage layer to be based on upb_msg objects from the upb library. This should lead to much better parsing performance, particularly for large messages. (#8184).
  • Fill out JRuby support (#7923)
  • [Ruby] Fix: (SIGSEGV) gRPC-Ruby issue on Windows. memory alloc infinite recursion/run out of memory (#8195)
  • Fix jruby support to handle messages nested more than 1 level deep (#8194)
  • Java:
  • Avoid possible UnsupportedOperationException when using CodedInputSteam with a direct ByteBuffer.
  • Make Durations.comparator() and Timestamps.comparator() Serializable.
  • Add more detailed error information for dynamic message field type validation failure
  • Removed declarations of functions declared in java_names.h from java_helpers.h.
  • Now Proto3 Oneof fields have "has" methods for checking their presence in Java.
  • Annotates Java proto generated *_FIELD_NUMBER constants.
  • Add -assumevalues to remove JvmMemoryAccessor on Android.
  • C#:
  • Fix parsing negative Int32Value that crosses segment boundary (#8035)
  • Change ByteString to use memory and support unsafe create without copy (#7645)
  • Optimize MapField serialization by removing MessageAdapter (#8143)
  • Allow FileDescriptors to be parsed with extension registries (#8220)
  • Optimize writing small strings (#8149)

New in Protocol Buffers 3.15.0 RC2 (Feb 18, 2021)

  • Update protobuf version

New in Protocol Buffers 3.15.0 RC1 (Feb 10, 2021)

  • Added PHP changes for 3.15.0 into package.xml

New in Protocol Buffers 3.14.0 (Nov 14, 2020)

  • Protocol Compiler:
  • The proto compiler no longer requires a .proto filename when it is not
  • generating code.
  • Added flag --deterministic_output to protoc --encode=....
  • Fixed deadlock when using google.protobuf.Any embedded in aggregate options.
  • C++:
  • Arenas are now unconditionally enabled. cc_enable_arenas no longer has
  • any effect.
  • Removed inlined string support, which is incompatible with arenas.
  • Fix a memory corruption bug in reflection when mixing optional and
  • non-optional fields.
  • Make SpaceUsed() calculation more thorough for map fields.
  • Add stack overflow protection for text format with unknown field values.
  • FieldPath::FollowAll() now returns a bool to signal if an out-of-bounds
  • error was encountered.
  • Performance improvements for Map.
  • Minor formatting fix when dumping a descriptor to .proto format with
  • DebugString.
  • UBSAN fix in RepeatedField (#2073).
  • When running under ASAN, skip a test that makes huge allocations.
  • Fixed a crash that could happen when creating more than 256 extensions in
  • a single message.
  • Fix a crash in BuildFile when passing in invalid descriptor proto.
  • Parser security fix when operating with CodedInputStream.
  • Warn against the use of AllowUnknownExtension.
  • Migrated to C++11 for-range loops instead of index-based loops where
  • possible. This fixes a lot of warnings when compiling with -Wsign-compare.
  • Fix segment fault for proto3 optional (#7805)
  • Adds a CMake option to build libprotoc separately (#7949)
  • Java:
  • Bugfix in mergeFrom() when a oneof has multiple message fields.
  • Fix RopeByteString.RopeInputStream.read() returning -1 when told to read
  • 0 bytes when not at EOF.
  • Redefine remove(Object) on primitive repeated field Lists to avoid
  • autoboxing.
  • Support "u" escapes in textformat string literals.
  • Trailing empty spaces are no longer ignored for FieldMask.
  • Fix FieldMaskUtil.subtract to recursively remove mask.
  • Mark enums with @java.lang.Deprecated if the proto enum has option
  • deprecated = true;.
  • Adding forgotten duration.proto to the lite library (#7738)
  • Python:
  • Print google.protobuf.NullValue as null instead of "NULL_VALUE" when it is
  • used outside WKT Value/Struct.
  • Fix bug occurring when attempting to deep copy an enum type in python 3.
  • Add a setuptools extension for generating Python protobufs (#7783)
  • Remove uses of pkg_resources in non-namespace packages. (#7902)
  • [bazel/py] Omit google/init.py from the Protobuf runtime. (#7908)
  • Removed the unnecessary setuptools package dependency for Python package (#7511)
  • Fix PyUnknownFields memory leak (#7928)
  • PHP:
  • Added support for "==" to the PHP C extension (#7883)
  • Added == operators for Map and Array. (#7900)
  • Native C well-known types (#7944)
  • Optimized away hex2bin() call in generated code (#8006)
  • New version of upb, and a new hash function wyhash in third_party. (#8000)
  • add missing hasOneof method to check presence of oneof fields (#8003)
  • Go:
  • Update go_package options to reference google.golang.org/protobuf module.
  • C#:
  • annotate ByteString.CopyFrom(ReadOnlySpan) as SecuritySafeCritical (#7701)
  • Fix C# optional field reflection when there are regular fields too (#7705)
  • Fix parsing negative Int32Value that crosses segment boundary (#8035)
  • Javascript:
  • JS: parse (un)packed fields conditionally (#7379)

New in Protocol Buffers 3.14.0 RC 1 (Nov 6, 2020)

  • Update protobuf version

New in Protocol Buffers 3.13.0 (Aug 15, 2020)

  • Update protobuf version.

New in Protocol Buffers 3.12.3 (Jun 3, 2020)

  • Tweak the union used for Extensions to support old generated code. #7573

New in Protocol Buffers 3.12.2 (May 27, 2020)

  • C++:
  • Simplified the template export macros to fix the build for mingw32. (#7539)
  • Objective-C:
  • Fix for the :protobuf_objc target in the Bazel BUILD file. (#7538)

New in Protocol Buffers 3.12.1 (May 21, 2020)

  • Ruby:
  • Re-add binary gems for Ruby 2.3 and 2.4. These are EOL upstream, however many people still use them and dropping support will require more coordination. (#7529, #7531).

New in Protocol Buffers 3.12.0 (May 16, 2020)

  • Protocol Compiler:
  • [experimental] Singular, non-message typed fields in proto3 now support
  • presence tracking. This is enabled by adding the "optional" field label and
  • passing the --experimental_allow_proto3_optional flag to protoc.
  • For usage info, see docs/field_presence.md.
  • During this experimental phase, code generators should update to support
  • proto3 presence, see docs/implementing_proto3_presence.md for instructions.
  • Allow duplicate symbol names when multiple descriptor sets are passed on
  • the command-line, to match the behavior when multiple .proto files are passed.
  • Deterministic protoc --descriptor_set_out (#7175)
  • C++:
  • [experimental] Added proto3 presence support.
  • New descriptor APIs to support proto3 presence.
  • Fix for #7463 in -rc1 (core dump mixing optional and singular fields in proto3)
  • Enable Arenas by default on all .proto files.
  • Documented that users are not allowed to subclass Message or MessageLite.
  • Mark generated classes as final; inheriting from protos is strongly discouraged.
  • Add stack overflow protection for text format with unknown fields.
  • Add accessors for map key and value FieldDescriptors.
  • Add FieldMaskUtil::FromFieldNumbers().
  • MessageDifferencer: use ParsePartial() on Any fields so the diff does not
  • fail when there are missing required fields.
  • ReflectionOps::Merge(): lookup messages in the right factory, if it can.
  • Added Descriptor::WellKnownTypes enum and Descriptor::well_known_type()
  • accessor as an easier way of determining if a message is a Well-Known Type.
  • Optimized RepeatedField::Add() when it is used in a loop.
  • Made proto move/swap more efficient.
  • De-virtualize the GetArena() method in MessageLite.
  • Improves performance of json_stream_parser.cc by factor 1000 (#7230)
  • bug: #7076 undefine Windows OUT and OPTIONAL macros (#7087)
  • Fixed a bug in FieldDescriptor::DebugString() that would erroneously print
  • an "optional" label for a field in a oneof.
  • Fix bug in parsing bool extensions that assumed they are always 1 byte.
  • Fix off-by-one error in FieldOptions::ByteSize() when extensions are present.
  • Clarified the comments to show an example of the difference between
  • Descriptor::extension and DescriptorPool::FindAllExtensions.
  • Add a compiler option 'code_size' to force optimize_for=code_size on all
  • protos where this is possible.
  • Java:
  • [experimental] Added proto3 presence support.
  • Fix for #7480 in -rc1 ("TextFormat and JsonFormat ignore experimental proto3 optional enums")
  • Fix for #7505 in -rc1 (" toString() returns incorrect ascii when there are duplicate keys in a map")
  • Mark java enum _VALUE constants as @deprecated if the enum field is deprecated
  • reduce size for enums with allow_alias set to true.
  • Sort map fields alphabetically by the field's key when printing textproto.
  • TextFormat.merge() handles Any as top level type.
  • Throw a descriptive IllegalArgumentException when calling
  • getValueDescriptor() on enum special value UNRECOGNIZED instead of
  • ArrayIndexOutOfBoundsException.
  • Fixed an issue with JsonFormat.printer() where setting printingEnumsAsInts()
  • would override the configuration passed into includingDefaultValueFields().
  • Implement overrides of indexOf() and contains() on primitive lists returned
  • for repeated fields to avoid autoboxing the list contents.
  • Add overload to FieldMaskUtil.fromStringList that accepts a descriptor.
  • [bazel] Move Java runtime/toolchains into //java (#7190)
  • Python:
  • [experimental] Added proto3 presence support.
  • [experimental] fast import protobuf module, only works with cpp generated code linked in.
  • Truncate 'float' fields to 4 bytes of precision in setters for pure-Python
  • implementation (C++ extension was already doing this).
  • Fixed a memory leak in C++ bindings.
  • Added a deprecation warning when code tries to create Descriptor objects
  • directly.
  • Fix unintended comparison between bytes and string in descriptor.py.
  • Avoid printing excess digits for float fields in TextFormat.
  • Remove Python 2.5 syntax compatibility from the proto compiler generated _pb2.py module code.
  • Drop 3.3, 3.4 and use single version docker images for all python tests (#7396)
  • JavaScript:
  • Fix js message pivot selection (#6813)
  • PHP:
  • Persistent Descriptor Pool (#6899)
  • Implement lazy loading of php class for proto messages (#6911)
  • Correct @return in Any.unpack docblock (#7089)
  • Ignore unknown enum value when ignore_unknown specified (#7455)
  • Ruby:
  • [experimental] Implemented proto3 presence for Ruby. (#7406)
  • Stop building binary gems for ruby <2.5 (#7453)
  • Fix for wrappers with a zero value (#7195)
  • Fix for JSON serialization of 0/empty-valued wrapper types (#7198)
  • Call "Class#new" over rb_class_new_instance in decoding (#7352)
  • Build extensions for Ruby 2.7 (#7027)
  • assigning 'nil' to submessage should clear the field. (#7397)
  • C#:
  • [experimental] Add support for proto3 presence fields in C# (#7382)
  • Cleanup various bits of Google.Protobuf (#6674)
  • Fix conformance test failures for Google.Protobuf (#6910)
  • Fix latest ArgumentException for C# extensions (#6938)
  • Remove unnecessary branch from ReadTag (#7289)
  • Enforce recursion depth checking for unknown fields (#7132)
  • Mark GetOption API as obsolete and expose the "GetOptions()" method
  • on descriptors instead (#7491)
  • Remove Has/Clear members for C# message fields in proto2 (#7429)
  • Objective-C:
  • [experimental] ObjC Proto3 optional support (#7421)
  • Block subclassing of generated classes (#7124)
  • Use references to Obj C classes instead of names in descriptors. (#7026)
  • Revisit how the WKTs are bundled with ObjC. (#7173)
  • Other:
  • Add a proto_lang_toolchain for javalite (#6882)
  • [bazel] Update gtest and deprecate //external:{gtest,gtest_main} (#7237)
  • Add application note for explicit presence tracking. (#7390)
  • Howto doc for implementing proto3 presence in a code generator. (#7407)

New in Protocol Buffers 3.12.0 RC2 (May 13, 2020)

  • C++ / Python:
  • Fix for #7463 ("mixing with optional fields: core dump --experimental_allow_proto3_optional")
  • Java:
  • Fix for #7480 ("TextFormat and JsonFormat ignore experimental proto3 optional enums")
  • PHP:
  • Ignore unknown enum value when ignore_unknown specified (#7455)
  • C#:
  • Mark GetOption API as obsolete and expose the "GetOptions()" method on descriptors instead (#7491)
  • Remove Has/Clear members for C# message fields in proto2 (#7429)

New in Protocol Buffers 3.12.0 RC1 (May 5, 2020)

  • Protocol Compiler:
  • [experimental] Singular, non-message typed fields in proto3 now support presence tracking. This is enabled by adding the "optional" field label and passing the --experimental_allow_proto3_optional flag to protoc.
  • For usage info, see docs/field_presence.md.
  • During this experimental phase, code generators should update to support
  • proto3 presence, see docs/implementing_proto3_presence.md for instructions.
  • Allow duplicate symbol names when multiple descriptor sets are passed on the command-line, to match the behavior when multiple .proto files are passed.
  • Deterministic protoc --descriptor_set_out (#7175)
  • C++:
  • [experimental] Added proto3 presence support.
  • New descriptor APIs to support proto3 presence.
  • Enable Arenas by default on all .proto files.
  • Documented that users are not allowed to subclass Message or MessageLite.
  • Mark generated classes as final; inheriting from protos is strongly discouraged.
  • Add stack overflow protection for text format with unknown fields.
  • Add accessors for map key and value FieldDescriptors.
  • Add FieldMaskUtil::FromFieldNumbers().
  • MessageDifferencer: use ParsePartial() on Any fields so the diff does not
  • fail when there are missing required fields.
  • ReflectionOps::Merge(): lookup messages in the right factory, if it can.
  • Added Descriptor::WellKnownTypes enum and Descriptor::well_known_type()
  • accessor as an easier way of determining if a message is a Well-Known Type.
  • Optimized RepeatedField::Add() when it is used in a loop.
  • Made proto move/swap more efficient.
  • De-virtualize the GetArena() method in MessageLite.
  • Improves performance of json_stream_parser.cc by factor 1000 (#7230)
  • bug: #7076 undefine Windows OUT and OPTIONAL macros (#7087)
  • Fixed a bug in FieldDescriptor::DebugString() that would erroneously print
  • an "optional" label for a field in a oneof.
  • Fix bug in parsing bool extensions that assumed they are always 1 byte.
  • Fix off-by-one error in FieldOptions::ByteSize() when extensions are present.
  • Clarified the comments to show an example of the difference between
  • Descriptor::extension and DescriptorPool::FindAllExtensions.
  • Add a compiler option 'code_size' to force optimize_for=code_size on all
  • protos where this is possible.
  • Java:
  • [experimental] Added proto3 presence support.
  • Mark java enum _VALUE constants as @deprecated if the enum field is deprecated
  • reduce size for enums with allow_alias set to true.
  • Sort map fields alphabetically by the field's key when printing textproto.
  • TextFormat.merge() handles Any as top level type.
  • Throw a descriptive IllegalArgumentException when calling
  • getValueDescriptor() on enum special value UNRECOGNIZED instead of
  • ArrayIndexOutOfBoundsException.
  • Fixed an issue with JsonFormat.printer() where setting printingEnumsAsInts()
  • would override the configuration passed into includingDefaultValueFields().
  • Implement overrides of indexOf() and contains() on primitive lists returned
  • for repeated fields to avoid autoboxing the list contents.
  • Add overload to FieldMaskUtil.fromStringList that accepts a descriptor.
  • [bazel] Move Java runtime/toolchains into //java (#7190)
  • Python:
  • [experimental] Added proto3 presence support.
  • [experimental] fast import protobuf module, only works with cpp generated code linked in.
  • Truncate 'float' fields to 4 bytes of precision in setters for pure-Python
  • implementation (C++ extension was already doing this).
  • Fixed a memory leak in C++ bindings.
  • Added a deprecation warning when code tries to create Descriptor objects
  • directly.
  • Fix unintended comparison between bytes and string in descriptor.py.
  • Avoid printing excess digits for float fields in TextFormat.
  • Remove Python 2.5 syntax compatibility from the proto compiler generated _pb2.py module code.
  • Drop 3.3, 3.4 and use single version docker images for all python tests (#7396)
  • JavaScript:
  • Fix js message pivot selection (#6813)
  • PHP:
  • Persistent Descriptor Pool (#6899)
  • Implement lazy loading of php class for proto messages (#6911)
  • Correct @return in Any.unpack docblock (#7089)
  • Ruby:
  • [experimental] Implemented proto3 presence for Ruby. (#7406)
  • Stop building binary gems for ruby <2.5 (#7453)
  • Fix for wrappers with a zero value (#7195)
  • Fix for JSON serialization of 0/empty-valued wrapper types (#7198)
  • Call "Class#new" over rb_class_new_instance in decoding (#7352)
  • Build extensions for Ruby 2.7 (#7027)
  • assigning 'nil' to submessage should clear the field. (#7397)
  • C#:
  • [experimental] Add support for proto3 presence fields in C# (#7382)
  • Cleanup various bits of Google.Protobuf (#6674)
  • Fix conformance test failures for Google.Protobuf (#6910)
  • Fix latest ArgumentException for C# extensions (#6938)
  • Remove unnecessary branch from ReadTag (#7289)
  • Enforce recursion depth checking for unknown fields (#7132)
  • Objective-C:
  • [experimental] ObjC Proto3 optional support (#7421)
  • Block subclassing of generated classes (#7124)
  • Use references to Obj C classes instead of names in descriptors. (#7026)
  • Revisit how the WKTs are bundled with ObjC. (#7173)
  • Other:
  • Add a proto_lang_toolchain for javalite (#6882)
  • [bazel] Update gtest and deprecate //external:{gtest,gtest_main} (#7237)
  • Add application note for explicit presence tracking. (#7390)
  • Howto doc for implementing proto3 presence in a code generator. (#7407)

New in Protocol Buffers 3.11.4 (Feb 14, 2020)

  • 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)

New in Protocol Buffers 3.11.3 (Feb 3, 2020)

  • C++:
  • Add OUT and OPTIONAL to windows portability files (#7087)
  • PHP:
  • Refactored ulong to zend_ulong for php7.4 compatibility (#7147)
  • Call register_class before getClass from desc to fix segfault (#7077)

New in Protocol Buffers 3.11.2 (Dec 14, 2019)

  • Make c extension portable for php 7.4 (#6968)

New in Protocol Buffers 3.11.1 (Dec 3, 2019)

  • PHP:
  • Extern declare protobuf_globals (#6946)

New in Protocol Buffers 3.11.0 (Nov 26, 2019)

  • C++:
  • Make serialization method naming consistent
  • Make proto runtime + generated code free of deprecation warnings
  • Moved ShutdownProtobufLibrary() to message_lite.h. For backward compatibility a declaration is still available in stubs/common.h, but users should prefer message_lite.h
  • Removed non-namespace macro EXPECT_OK()
  • Removed mathlimits.h from stubs in favor of using std::numeric_limits from C++11
  • Fixed bug in parser when ending on a group tag
  • Add a helper function to UnknownFieldSet to deal with the changing return value of message::unknown_fields()
  • Fix incorrect use of string_view iterators
  • Support direct pickling of nested messages
  • Skip extension tag validation for MessageSet if unknown dependencies are allowed
  • Updated deprecation macros to annotate deprecated code (#6612)
  • Remove conversion warning in MapEntryFuncs::ByteSizeLong (#6766)
  • Revert "Make shared libraries be able to link to MSVC static runtime libraries, so that VC runtime is not required." (#6914)
  • Java:
  • Remove the usage of MethodHandle, so that Android users prior to API version 26 can use protobuf-java
  • Publish ProGuard config for javalite
  • Fix for StrictMode disk read violation in ExtensionRegistryLite
  • Include part of the ByteString's content in its toString().
  • Include unknown fields when merging proto3 messages in Java lite builders
  • Python:
  • Add float_precision option in json format printer
  • Optionally print bytes fields as messages in unknown fields, if possible
  • FieldPath: fix testing IsSet on root path ''
  • Experimental code gen (fast import protobuf module) which only work with cpp generated code linked in
  • JavaScript:
  • Remove guard for Symbol iterator for jspb.Map
  • PHP:
  • Avoid too much overhead in layout_init (#6716)
  • Lazily Create Singular Wrapper Message (#6833)
  • Implement lazy loading of php class for proto messages (#6911)
  • Ruby:
  • Ruby lazy wrappers optimization (#6797)
  • C#:
  • (RepeatedField): Capacity property to resize the internal array (#6530)
  • Experimental proto2 support is now officially available (#4642, #5183, #5350, #5936)
  • Getting started doc: https://github.com/protocolbuffers/protobuf/blob/master/docs/csharp/proto2.md
  • Add length checks to ExtensionCollection (#6759)
  • Optimize parsing of some primitive and wrapper types (#6843)
  • Use 3 parameter Encoding.GetString for default string values (#6828)
  • Change _Extensions property to normal body rather than expression (#6856)
  • Objective C:
  • Fixed unaligned reads for 32bit arm with newer Xcode versions (#6678)

New in Protocol Buffers 3.11.0 RC 2 (Nov 23, 2019)

  • Implement lazy loading of php class for proto messages (#6911)
  • Fixes #6918

New in Protocol Buffers 3.11.0 RC 1 (Nov 20, 2019)

  • C++:
  • Make serialization method naming consistent
  • Make proto runtime + generated code free of deprecation warnings
  • Moved ShutdownProtobufLibrary() to message_lite.h. For backward compatibility a declaration is still available in stubs/common.h, but users should prefer message_lite.h
  • Removed non-namespace macro EXPECT_OK()
  • Removed mathlimits.h from stubs in favor of using std::numeric_limits from C++11
  • Fixed bug in parser when ending on a group tag
  • Add a helper function to UnknownFieldSet to deal with the changing return value of message::unknown_fields()
  • Fix incorrect use of string_view iterators
  • Support direct pickling of nested messages
  • Skip extension tag validation for MessageSet if unknown dependencies are allowed
  • Updated deprecation macros to annotate deprecated code (#6612)
  • Remove conversion warning in MapEntryFuncs::ByteSizeLong (#6766)
  • Make shared libraries be able to link to MSVC static runtime libraries (#6780)
  • Java:
  • Remove the usage of MethodHandle, so that Android users prior to API version 26 can use protobuf-java
  • Publish ProGuard config for javalite
  • Fix for StrictMode disk read violation in ExtensionRegistryLite
  • Include part of the ByteString's content in its toString().
  • Include unknown fields when merging proto3 messages in Java lite builders
  • Python:
  • Add float_precision option in json format printer
  • Optionally print bytes fields as messages in unknown fields, if possible
  • FieldPath: fix testing IsSet on root path ''
  • Experimental code gen (fast import protobuf module) which only work with cpp generated code linked in
  • JavaScript:
  • Remove guard for Symbol iterator for jspb.Map
  • PHP:
  • Avoid too much overhead in layout_init (#6716)
  • Lazily Create Singular Wrapper Message (#6833)
  • Ruby:
  • Ruby lazy wrappers optimization (#6797)
  • C#:
  • RepeatedField): Capacity property to resize the internal array (#6530)
  • Experimental proto2 support is now officially available (#4642, #5183, #5350, #5936)
  • Getting started doc: https://github.com/protocolbuffers/protobuf/blob/master/docs/csharp/proto2.md
  • Add length checks to ExtensionCollection (#6759)
  • Optimize parsing of some primitive and wrapper types (#6843)
  • Use 3 parameter Encoding.GetString for default string values (#6828)
  • Change _Extensions property to normal body rather than expression (#6856)
  • Objective C:
  • Fixed unaligned reads for 32bit arm with newer Xcode versions (#6678)

New in Protocol Buffers 3.10.1 (Oct 29, 2019)

  • C#:
  • Add length checks to ExtensionCollection (#6759)
  • Disable extension code gen for C# (#6760)
  • Ruby:
  • Fixed bug in Ruby DSL when no names are defined in a file (#6756)

New in Protocol Buffers 3.10.0 (Oct 3, 2019)

  • C++:
  • Switch the proto parser to the faster MOMI parser.
  • Properly escape Struct keys in the proto3 JSON serializer.
  • Fix crash on uninitialized map entries.
  • Informed the compiler of has-bit invariant to produce better code
  • Unused imports of files defining descriptor extensions will now be reported
  • Add proto2::util::RemoveSubranges to remove multiple subranges in linear time.
  • Added BaseTextGenerator::GetCurrentIndentationSize()
  • Made implicit weak fields compatible with the Apple linker
  • 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.
  • Do not convert unknown field name to snake case to accurately report error.
  • Fix a UBSAN warnings. (#6333)
  • Add podspec for C++ (#6404)
  • protoc: fix source code info location for missing label (#6436)
  • C++ Add move constructor for Reflection's SetString (#6477)
  • Java:
  • This release has a known issue on Android API level <26 (#6718)
  • Call loadDescriptor outside of synchronized block to remove one possible source of deadlock.
  • Have oneof enums implement a separate interface (other than EnumLite) for clarity.
  • Opensource Android Memory Accessors
  • Update TextFormat to make use of the new TypeRegistry.
  • Support getFieldBuilder and getRepeatedFieldBuilder in ExtendableBuilder
  • Update JsonFormat to make use of the new TypeRegistry.
  • Add proguard config generator for GmmBenchmarkSuiteLite.
  • Change ProtobufArrayList to use Object[] instead of ArrayList for 5-10% faster parsing
  • Implement ProtobufArrayList.add(E) for 20% (5%-40%) faster overall protolite2 parsing
  • Make a copy of JsonFormat.TypeRegistry at the protobuf top level package. This will eventually replace JsonFormat.TypeRegistry.
  • Fix javadoc warnings in generated files (#6231)
  • Java: Add Automatic-Module-Name entries to the Manifest (#6568)
  • Python:
  • Add descriptor methods in descriptor_pool are deprecated.
  • Uses explicit imports to prevent multithread test failures in py3.
  • Added delitem for Python extension dict
  • Update six version to 1.12.0 and fix legacy_create_init issue (#6391)
  • JavaScript:
  • Remove deprecated boolean option to getResultBase64String().
  • Fix sint64 zig-zag encoding.
  • Simplify hash64 string conversion to avoid DIGIT array. Should reduce overhead if these functions aren't used, and be more efficient by avoiding linear array searches.
  • 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)
  • Ruby:
  • Fix scope resolution for Google namespace (#5878)
  • Support hashes for struct initializers (#5716)
  • Optimized away the creation of empty string objects. (#6502)
  • Roll forward Ruby upb changes now that protobuf Ruby build is fixed (#5866)
  • Optimized layout_mark() for Ruby (#6521)
  • 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)
  • Other:
  • Override CocoaPods module to lowercase (#6464)

New in Protocol Buffers 3.9.2 (Sep 24, 2019)

  • Objective-C:
  • Remove OSReadLittle* due to alignment requirements. (#6678)
  • Don't use unions and instead use memcpy for the type swaps. (#6672)

New in Protocol Buffers 3.10.0 RC1 (Sep 6, 2019)

  • C++:
  • Switch the proto parser to the faster MOMI parser.
  • Properly escape Struct keys in the proto3 JSON serializer.
  • Fix crash on uninitialized map entries.
  • Informed the compiler of has-bit invariant to produce better code
  • Unused imports of files defining descriptor extensions will now be reported
  • Add proto2::util::RemoveSubranges to remove multiple subranges in linear time.
  • Added BaseTextGenerator::GetCurrentIndentationSize()
  • Made implicit weak fields compatible with the Apple linker
  • 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.
  • Do not convert unknown field name to snake case to accurately report error.
  • Fix a UBSAN warnings. (#6333)
  • Add podspec for C++ (#6404)
  • protoc: fix source code info location for missing label (#6436)
  • C++ Add move constructor for Reflection's SetString (#6477)
  • Java:
  • Call loadDescriptor outside of synchronized block to remove one possible source of deadlock.
  • Have oneof enums implement a separate interface (other than EnumLite) for clarity.
  • Opensource Android Memory Accessors
  • Update TextFormat to make use of the new TypeRegistry.
  • Support getFieldBuilder and getRepeatedFieldBuilder in ExtendableBuilder
  • Update JsonFormat to make use of the new TypeRegistry.
  • Add proguard config generator for GmmBenchmarkSuiteLite.
  • Change ProtobufArrayList to use Object[] instead of ArrayList for 5-10% faster parsing
  • Implement ProtobufArrayList.add(E) for 20% (5%-40%) faster overall protolite2 parsing
  • Make a copy of JsonFormat.TypeRegistry at the protobuf top level package. This will eventually replace JsonFormat.TypeRegistry.
  • Fix javadoc warnings in generated files (#6231)
  • Java: Add Automatic-Module-Name entries to the Manifest (#6568)
  • Python:
  • Add descriptor methods in descriptor_pool are deprecated.
  • Uses explicit imports to prevent multithread test failures in py3.
  • Added delitem for Python extension dict
  • Update six version to 1.12.0 and fix legacy_create_init issue (#6391)
  • JavaScript:
  • Remove deprecated boolean option to getResultBase64String().
  • Fix sint64 zig-zag encoding.
  • Simplify hash64 string conversion to avoid DIGIT array. Should reduce overhead if these functions aren't used, and be more efficient by avoiding linear array searches.
  • 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.
  • Ruby:
  • Fix scope resolution for Google namespace (#5878)
  • Support hashes for struct initializers (#5716)
  • Optimized away the creation of empty string objects. (#6502)
  • Roll forward Ruby upb changes now that protobuf Ruby build is fixed (#5866)
  • Optimized layout_mark() for Ruby (#6521)
  • Optimization for layout_init() (#6547)
  • Fix for GC of Ruby map frames. (#6533)
  • Other:
  • Override CocoaPods module to lowercase (#6464)

New in Protocol Buffers 3.9.0 (Jul 12, 2019)

  • C++:
  • Optimize and simplify implementation of RepeatedPtrFieldBase
  • Don't create unnecessary unknown field sets.
  • Remove branch from accessors to repeated field element array.
  • Added delimited parse and serialize util.
  • Reduce size by not emitting constants for fieldnumbers
  • Fix a bug when comparing finite and infinite field values with explicit tolerances.
  • TextFormat::Parser should use a custom Finder to look up extensions by number if one is provided.
  • Add MessageLite::Utf8DebugString() to make MessageLite more compatible with Message.
  • Fail fast for better performance in DescriptorPool::FindExtensionByNumber() if descriptor has no defined extensions.
  • Adding the file name to help debug colliding extensions
  • Added FieldDescriptor::PrintableNameForExtension() and DescriptorPool::FindExtensionByPrintableName().
  • The latter will replace Reflection::FindKnownExtensionByName().
  • Replace NULL with nullptr
  • Created a new Add method in repeated field that allows adding a range of elements all at once.
  • Enabled enum name-to-value mapping functions for C++ lite
  • Avoid dynamic initialization in descriptor.proto generated code
  • Move stream functions to MessageLite from Message.
  • Move all zero_copy_stream functionality to io_lite.
  • Do not create array of matched fields for simple repeated fields
  • Enabling silent mode by default to reduce make compilation noise. (#6237)
  • Java:
  • Expose TextFormat.Printer and make it configurable. Deprecate the static methods.
  • Library for constructing google.protobuf.Struct and google.protobuf.Value
  • Make OneofDescriptor extend GenericDescriptor.
  • Expose streamingness of service methods from MethodDescriptor.
  • Fix a bug where TextFormat fails to parse Any filed with > 1 embedded message sub-fields.
  • Establish consistent JsonFormat behavior for nulls in oneofs, regardless of order.
  • Update GSON version to 3.8.5. (#6268)
  • Add protobuf_java_lite Bazel target. (#6177)
  • Python:
  • Change implementation of Name() for enums that allow aliases in proto2 in Python
  • to be in line with claims in C++ implementation (to return first value).
  • Explicitly say what field cannot be set when the new value fails a type check.
  • Duplicate register in descriptor pool will raise errors
  • Add slots to all well_known_types classes, custom attributes are not allowed anymore.
  • text_format only present 8 valid digits for float fields by default
  • JavaScript:
  • Add Oneof enum to the list of goog.provide
  • PHP:
  • Rename get/setXXXValue to get/setXXXWrapper. (#6295)
  • Ruby:
  • Remove to_hash methods. (#6166)

New in Protocol Buffers 3.8.0 (May 29, 2019)

  • C++:
  • Use std::atomic in case of myriad2 platform
  • Always declare enums to be int-sized
  • Added DebugString() and ShortDebugString() methods on MessageLite
  • Specialized different parse loop control flows
  • Make hasbits potentially in register. The or's start forming an obstacle because it's a read modify store on the same mem address on each iteration.
  • Move to an internal MACRO for parser validity checks.
  • Improve map parsing performance.
  • Make MergePartialFromCodedStream non virtual. This allows direct calls, potential inlining and is also a code health improvement
  • Add an overall limit to parse_context to prevent reading past it. This allows to remove a annoying level of indirection.
  • Fix a mistake, we shouldn't verify map key/value strings for utf8 in opt mode for proto2.
  • Further improvements to cut binary size.
  • Prepare to make MergePartialFromCodedStream non-virtual.
  • A report on some interesting behavior change in python (caused by b/27494216) made me realize there is a check that needs to be done in case the parse ended on a end group tag.
  • Add a note of caution to the comments around skip in CodedOutputStream.
  • Simplify end check.
  • Add overload for ParseMessage for MessageLite/Message types. If the explicit type is not known inlining won't help de-virtualizing the virtual call.
  • Reduce linker input. It turns out that ParseMessage is not inlined, producing template instantiations that are used only once and save nothing but cost more.
  • Improve the parser.
  • [c++17] Changed proto2::RepeatedPtrField iterators to no longer derive from the deprecated std::iterator class.
  • Change the default value of case_insensitive_enum_parsing to false for JsonStringToMessage.
  • Add a warning if a field name doesn't match the style guide.
  • Fix TextFormat not round-trip correctly when float value is max float.
  • Added locationed info for some errors at compiler
  • Python reserved keywords are now working with getattr()/setattr() for most descriptors.
  • Added AllowUnknownField() in text_format
  • Append '_' to C++ reserved keywords for message, enum, extension
  • Fix MSVC warning C4244 in protobuf's parse_context.h.
  • Updating Iterators to be compatible with C++17 in MSVC.
  • Use capability annotation in mutex.h
  • Fix "UndefinedBehaviorSanitizer: cfi-bad-type"
  • CriticalSectionLock class as a lightweight replacement for std::mutex on Windows platforms.
  • Removed vestigial wire_format_lite_inl.h
  • C#:
  • Added System.Memory dependency.
  • Java:
  • Make Java protoc code generator ignore optimize_for LITE_RUNTIME. Users should instead use the Java lite protoc plugin.
  • Change Extension getMessageDefaultInstance() to return Message instead of MessageLite.
  • Prevent malicious input streams from leaking buffers for ByteString or ByteBuffer parsing.
  • Release new Javalite runtime.
  • Show warning in case potential file name conflict.
  • Allow Java reserved keywords to be used in extensions.
  • Added setAllowUnknownFields() in text format
  • Add memoization to ExtensionRegistryLite.getEmptyRegistry()
  • Improve performance of CodedOutputStream.writeUInt32NoTag
  • Add an optimized mismatch-finding algorithm to UnsafeUtil.
  • When serializing uint32 varints, check that we have MAX_VARINT32_SIZE bytes left, not just MAX_VARINT_SIZE.
  • Minor optimization to RopeByteString.PieceIterator
  • JavaScript:
  • Simplify generated toObject code when the default value is used.
  • Python:
  • Changes implementation of Name() for enums that allow aliases in proto2 in Python to be in line with claims in C++ implementation (to return first value).
  • Added double_format option in text format printer.
  • Added iter and contains to extension dict
  • Added allow_unknown_field option in python text format parser
  • Fixed Timestamp.ToDatetime() loses precision issue
  • Support unknown field in text format printer.
  • Float field will be convert to inf if bigger than struct.unpack('f', b'xffxffx7fx7f')[0] which is about 3.4028234664e+38,
  • convert to -inf if smaller than -3.4028234664e+38
  • Allowed casting str->bytes in Message.setstate
  • Ruby:
  • Helper methods to get enum name for Ruby.

New in Protocol Buffers 3.7.1 (Mar 28, 2019)

  • C++:
  • Avoid linking against libatomic in prebuilt protoc binaries (#5875)
  • Avoid marking generated C++ messages as final, though we will do this in a future release (#5928)
  • Miscellaneous build fixes
  • JavaScript:
  • Fixed redefinition of global variable f (#5932)
  • Ruby:
  • Replace strptime with custom implementation (#5906)
  • Fixed the bug that bytes fields cannot be larger than 16000 bytes (#5924)
  • Miscellaneous bug fixes
  • PHP:
  • Replace strptime with custom implementation (#5906)
  • Fixed the bug that bytes fields cannot be larger than 16000 bytes (#5924)

New in Protocol Buffers 3.7.0 RC3 (Feb 25, 2019)

  • Merge pull request #5766 from TeBoring/3.7.x-fix
  • Update version number to 3.7.0rc3

New in Protocol Buffers 3.7.0 RC2 (Feb 5, 2019)

  • Fixed infinite recursion problem with Java GeneratedMessageV3 (#5657)
  • GeneratedMessageV3#setUnknownFieldsProto3 was trying to delegate to
  • setUnknownFields but was inadvertently resulting in infinite recursion.
  • This commit makes setUnknownFields and setUnknownFieldsProto3 delegate
  • to a common private method to fix the problem and avoid confusion.

New in Protocol Buffers 3.7.0 RC1 (Jan 31, 2019)

  • Convert integer to string if field is string field in json

New in Protocol Buffers 3.6.1 (Jan 14, 2019)

  • C++:
  • Introduced workaround for Windows issue with std::atomic and std::once_flag initialization (#4777, #4773)
  • PHP:
  • Added compatibility with PHP 7.3 (#4898)
  • Ruby:
  • Fixed Ruby crash involving Any encoding (#4718)

New in Protocol Buffers 2.5.0 (Mar 10, 2013)

  • General:
  • New notion "import public" that allows a proto file to forward the content it imports to its importers.
  • New enum option "allow_alias" that specifies whether different symbols can be assigned the same numeric value. Default value is "true". Setting it to false causes the compiler to reject enum definitions where multiple symbols have the same numeric value.
  • C++:
  • New generated method set_allocated_foo(Type* foo) for message and string fields. This method allows you to set the field to a pre-allocated object and the containing message takes the ownership of that object.
  • Added SetAllocatedExtension() and ReleaseExtension() to extensions API.
  • Custom options are now formatted correctly when descriptors are printed in text format.
  • Various speed optimizations.
  • Java:
  • Comments in proto files are now collected and put into generated code as comments for corresponding classes and data members.
  • Added Parser to parse directly into messages without a Builder.
  • Added getters/setters to access the underlying ByteString of a string field directly.
  • ByteString now supports more operations: substring(), prepend(), and append(). The implementation of ByteString uses a binary tree structure to support these operations efficiently.
  • New method findInitializationErrors() that lists all missing required fields.
  • Various code size and speed optimizations.
  • Python:
  • Added support for dynamic message creation. DescriptorDatabase, DescriptorPool, and MessageFactory work like their C++ couterparts to simplify Descriptor construction from *DescriptorProtos, and MessageFactory provides a message instance from a Descriptor.
  • Added pickle support for protobuf messages.
  • Unknown fields are now preserved after parsing.
  • Fixed bug where custom options were not correctly populated. Custom options can be accessed now.
  • Added EnumTypeWrapper that provides better accessibility to enum types.
  • Added ParseMessage(descriptor, bytes) to generate a new Message instance from a descriptor and a byte string.

New in Protocol Buffers 2.4.1 (Feb 4, 2012)

  • C++:
  • Fixed the frendship problem for old compilers to make the library now gcc 3
  • compatible again
  • Fixed vcprojects/extract_includes.bat to extract compiler/plugin.h
  • Java:
  • Removed usages of JDK 1.6 only features to make the library now JDK 1.5
  • compatible again
  • Fixed a bug about negative enum values
  • serialVersionUID is now defined in generated messages for java serializing
  • Fixed protoc to use java.lang.Object, which makes "Object" now a valid
  • message name again
  • Python:
  • Experimental C++ implementation now requires C++ protobuf library installed
  • See the README.txt in the python directory for details

New in Protocol Buffers 2.4.0 (Feb 4, 2012)

  • General:
  • The RPC (cc|java|py)_generic_services default value is now false instead of
  • true
  • Custom options can have aggregate types. For example
  • message MyOption {
  • optional string comment = 1
  • optional string author = 2
  • extend google.protobuf.FieldOptions {
  • optional MyOption myoption = 12345
  • This option can now be set as follows
  • message SomeType {
  • optional int32 field = 1 [(myoption) = { comment:'x' author:'y' }]
  • C++:
  • Various speed and code size optimizations
  • Added a release_foo() method on string and message fields
  • Fixed gzip_output_stream sub-stream handling
  • Java:
  • Builders now maintain sub-builders for sub-messages. Use getFooBuilder() to
  • get the builder for the sub-message "foo". This allows you to repeatedly
  • modify deeply-nested sub-messages without rebuilding them
  • Builder.build() no longer invalidates the Builder for generated messages
  • You may continue to modify it and then build another message)
  • Code generator will generate efficient equals() and hashCode()
  • implementations if new option java_generate_equals_and_hash is enabled
  • Otherwise, reflection-based implementations are used.)
  • Generated messages now implement Serializable
  • Fields with [deprecated=true] will be marked with @Deprecated in Java
  • Added lazy conversion of UTF-8 encoded strings to String objects to improve
  • performance
  • Various optimizations
  • Enum value can be accessed directly, instead of calling getNumber() on the
  • enum member
  • For each enum value, an integer constant is also generated with the suffix
  • VALUE
  • Python:
  • Added an experimental C++ implementation for Python messages via a Python
  • extension. Implementation type is controlled by an environment variable
  • PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION (valid values: "cpp" and "python")
  • The default value is currently "python" but will be changed to "cpp" in
  • future release
  • Improved performance on message instantiation significantly
  • Most of the work on message instantiation is done just once per message
  • class, instead of once per message instance
  • Improved performance on text message parsing
  • Allow add() to forward keyword arguments to the concrete class
  • E.g. instead of
  • item = repeated_field.add()
  • item.foo = bar
  • item.baz = quux
  • You can do
  • repeated_field.add(foo=bar, baz=quux)
  • Added a sort() interface to the BaseContainer
  • Added an extend() method to repeated composite fields
  • Added UTF8 debug string support

New in Protocol Buffers 2.3.0 (Mar 12, 2010)

  • General:
  • Parsers for repeated numeric fields now always accept both packed and unpacked input. The [packed=true] option only affects serializers. Therefore, it is possible to switch a field to packed format without breaking backwards-compatibility -- as long as all parties are using protobuf 2.3.0 or above, at least.
  • The generic RPC service code generated by the C++, Java, and Python generators can be disabled via file options:
  • option cc_generic_services = false;
  • option java_generic_services = false;
  • option py_generic_services = false;
  • This allows plugins to generate alternative code, possibly specific to some particular RPC implementation.
  • protoc:
  • Now supports a plugin system for code generators. Plugins can generate code for new languages or inject additional code into the output of other code generators. Plugins are just binaries which accept a protocol buffer on stdin and write a protocol buffer to stdout, so they may be written in any language. See src/google/protobuf/compiler/plugin.proto.
  • If the output location ends in .zip or .jar, protoc will write its output to a zip/jar archive instead of a directory. For example: protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto. Currently the archive contents are not compressed, though this could change in the future. inf, -inf, and nan can now be used as default values for float and double fields.
  • C++:
  • Various speed and code size optimizations.
  • DynamicMessageFactory is now fully thread-safe.
  • Message::Utf8DebugString() method is like DebugString() but avoids escaping UTF-8 bytes.
  • Compiled-in message types can now contain dynamic extensions, through use of CodedInputStream::SetExtensionRegistry().
  • Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to match other platforms. Use --disable-shared to avoid this.
  • Java:
  • parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return false/null instead of throwing an exception.
  • Fixed some initialization ordering bugs.
  • Fixes for OpenJDK 7.
  • Python:
  • 10-25 times faster than 2.2.0, still pure-Python.
  • Calling a mutating method on a sub-message always instantiates the message in its parent even if the mutating method doesn't actually mutate anything (e.g. parsing from an empty string).
  • Expanded descriptors a bit.