Skip to content

Releases: protocolbuffers/protobuf

Protocol Buffers v22.0

16 Feb 18:17
Compare
Choose a tag to compare

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] Dropped C++11 Support
    • [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.
  • Breaking Change: Dropped C++11 Support
  • 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...
Read more

Protocol Buffers v22.0-rc3

10 Feb 20:17
Compare
Choose a tag to compare
Pre-release

Announcements

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

C++

  • Add C++ support for retention attribute (8f882e7)

Java

  • Use LazyStringArrayList directly in gencode. (e6dd59e)
  • Add Java support for retention attribute (1325913)

Objective-C

  • [ObjC] Mark classes that shouldn't be subclassed as such. (a185a6e)

Ruby

  • For Ruby oneof fields, generate hazzers for members (#11655) (d1a3c6d)

Ruby C-Extension

  • For Ruby oneof fields, generate hazzers for members (#11655) (d1a3c6d)
  • See also UPB changes below, which may affect Ruby C-Extension.

UPB (Python/PHP/Ruby C-Extension)

Other

  • Remove unused headers, include missing headers, match args, etc. (21a6a26)
  • Add a non-const overload of RepeatedPtrField::GetArena and deprecate the const overload. (4bf33da)
  • Optimize Varint Parsing for 32 and 64 bits (ac76ae9)
  • Fix reflection based parser for map entries with closed enum values. (55d2123)

Protocol Buffers v22.0-rc2

02 Feb 21:18
Compare
Choose a tag to compare
Pre-release

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)

Protocol Buffers v22.0-rc1 (Incomplete)

31 Jan 18:24
Compare
Choose a tag to compare
Pre-release

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.
  • Maven artifact suffix format has changed to -RCN instead of -rc-N

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)
  • Maven artifact suffix format has changed to -RCN instead of -rc-N

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 se...
Read more

Protocol Buffers v21.12

14 Dec 14:45
Compare
Choose a tag to compare

Python

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

Protocol Buffers v21.11

08 Dec 06:34
Compare
Choose a tag to compare

Python

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

Protocol Buffers v21.10

30 Nov 19:15
Compare
Choose a tag to compare

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)

Protocol Buffers v21.9

26 Oct 20:28
Compare
Choose a tag to compare

C++

  • Update zlib to 1.2.13 (#10819)

Python

Ruby

  • Replace libc strdup usage with internal impl to restore musl compat (#10818)

Protocol Buffers v21.8

18 Oct 18:18
Compare
Choose a tag to compare

Other

  • Fix for grpc.tools #17995 & protobuf #7474 (handle UTF-8 paths in argumentfile) (#10721)

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

Protocol Buffers v21.7

29 Sep 22:22
Compare
Choose a tag to compare

Java

  • 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.
  • This release addresses a Security Advisory for Java users