Skip to content

Releases: protocolbuffers/protobuf

Protocol Buffers v30.0-rc1

04 Feb 22:59
Compare
Choose a tag to compare
Pre-release

Announcements

  • This version includes breaking changes to: C++, Objective-C, Python, Rust.
    • [C++] Remove deprecated JsonOptions alias. (e2eb0a1)
    • [C++] Remove CMake submodule support in favor of fetched or installed dependencies. (3f06ca4)
    • [C++] Prohibit using Bazel+MSVC to build protobuf (117e7bb)
    • [C++] Remove deprecated Arena::CreateMessage. (d83a536)
    • [C++] Upgrade return type of type_name() and cpp_type_name() from const char* to absl::string_view. (a9ad51f)
    • [C++] Strip ctype from options in C++ (aebf8b9)
    • [C++] Remove MutableRepeatedFieldRef::Reserve() in reflection (913f7b0)
    • [C++] Upgrade return type of several string returning functions to absl::string_view. (d1990d9)
    • [C++] Flip default behavior for handling cmake dependencies. (9cc685e)
    • [C++] Add ASAN poisoning after clearing oneof messages on arena. (54d068e)
    • [C++] Remove deprecated RepeatedPtrField::ClearedCount(). (e8e3253)
    • [C++] Remove deprecated Arena::GetArena. (30ed452)
    • [Objective-C] [ObjC] Remove legacy WKT headers. (d9caebc)
    • [Objective-C] Upgrade return type of several string returning functions to absl::string_view. (d1990d9)
    • [Python] Remove deprecated reflection methods (292f964)
    • [Python] Remove deprecated GetPrototype MessageFactory.GetPrototype(), (c261b49)
    • [Python] Remove deprecated Python RPC Service Interfaces (5ba74b1)
    • [Python] Remove deprecated GetDebugString() from protobuf python cpp extension. (721a452)
    • [Python] Upgrade return type of several string returning functions to absl::string_view. (d1990d9)
    • [Python] Fix closed enum validation under editions (72b3eda)
    • [Python] Python setdefault behavior change for map field. (81da6b9)
    • [Python] Python nested message class qualname now contains the outer message name. (Previous qualname has the same result with name for nested message that outer message name was not included) (0720536)
  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Bazel

  • Remove reference to cc_proto_aspect (fa02f76)
  • Remove deprecated bazel/system_python.bzl alias. (00f108c)

Compiler

  • Have the protoc CLI properly report any parser warnings. (cafeaa4)
  • Split protoc apart from libprotoc in our cmake configs. (b4b93b3)
  • Begin adding extension numbers to SourceCodeInfo and FileDescriptorSet for tooling purposes. (9d7236b)
  • Fix various unsigned to signed comparison warnings. (#17212) (67de087)

C++

  • Make DebugString print debug output, enable debug markers for debug output (9a03332)
  • Fix missing port_undef (#20052) (0644388)
  • Use __builtin_expect_with_probability for proto field presence checks. (e958419)
  • Enable meta-tagging for redaction purposes (1f48795)
  • Breaking change: Prohibit using Bazel+MSVC to build protobuf (117e7bb)
  • Breaking change: Upgrade return type of several string returning functions to absl::string_view. (d1990d9)
  • Print the presence probability when analysis is enabled. (d4ba7ff)
  • Split protoc apart from libprotoc in our cmake configs. (b4b93b3)
  • Breaking change: Strip ctype from options in C++ (aebf8b9)
  • Breaking change: Remove MutableRepeatedFieldRef::Reserve() in reflection (913f7b0)
  • Remove stale references to C++14. (f4cc92c)
  • Breaking change: Upgrade return type of type_name() and cpp_type_name() from const char* to absl::string_view. (a9ad51f)
  • Update cmake minimum version to >=3.16. (21f535c)
  • Migrate coded output stream arguments from const std::string& to absl::string_view. (0361a59)
  • Breaking change: Remove deprecated Arena::GetArena. (30ed452)
  • Remove the time (or time-based) entropy being added to Map's seed. (a7875bb)
  • Don't use CLOCK_UPTIME_RAW if it won't be defined (#16951) (097dcda)
  • Fix DEPENDENCIES in protobuf_generate() to accept multiple values instead of silently dropping (52887e1)
  • Use ABSL_PREDICT_TRUE|FALSE instead of PROTOBUF_PREDICT_TRUE|FALSE. (fd47730)
  • Breaking change: Flip default behavior for handling cmake dependencies. (9cc685e)
  • Use [[maybe_unused]] instead of PROTOBUF_UNUSED. (a7dd155)
  • Use [[nodiscard]] instead of PROTOBUF_NODISCARD (1ceedf8)
  • Breaking change: Remove deprecated JsonOptions alias. (e2eb0a1)
  • Generate internal hasbits for singular proto3 implicit presence fields. (3e82ed4)
  • Add name mangling to nested names that collide with known generated names, like (f2cf85c)
  • Breaking change: Remove deprecated RepeatedPtrField::ClearedCount(). (e8e3253)
  • Breaking change: Add ASAN poisoning after clearing oneof messages on arena. (54d068e)
  • Breaking change: Remove deprecated Arena::CreateMessage. (d83a536)
  • Change DynamicCastMessage to throw a std::bad_cast exception when exceptions (33bbbeb)
  • Fixed a missing check in wire format verification. (2ac862f)
  • Comment change: clarifies that the field/value order is based on textual order in the file, not the order of the enums. (f92335b)
  • ...
Read more

Protocol Buffers v25.6

24 Jan 20:21
Compare
Choose a tag to compare

Announcements

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

Java

  • Add poison pill to makeExtensionsImmutable method (see News for details) (#20084) (3f1df78)

Kotlin

  • Populate Kotlin Manifest Files. (610f378)

PHP

PHP C-Extension

  • Backport windows fixes with INFINITY/NAN (#19390) (65196bc)
  • See also UPB changes below, which may affect PHP C-Extension.

Ruby

Ruby C-Extension

  • Fixed compiler warnings in the Ruby C extension. (c6fcd39)
  • Backport windows fixes with INFINITY/NAN (#19390) (65196bc)
  • See also UPB changes below, which may affect Ruby C-Extension.

UPB (Python/PHP/Ruby C-Extension)

Other

  • Update artifact actions (#19701) (028200c)
  • Remove CMake downgrade workaround from Windows CI tests (#19633) (e2cc170)
  • Upgrade setup-ruby to get around 'Unsupported platform macos-13' (3f26684)
  • Remove continous-only tag which didn't exist in 25.x (5f9e57b)
  • Update remaining Python 3.8 upb macos tests to macos-13 (f122729)
  • Update GitHub Actions to use macOS-13 ahead of macOS-12 deprecation. (6fad18c)
  • Upgrade PHP mac runner to avoid slow PHP installs (#18972) (4212301)
  • Restore macOS CMake configuration. (31c5280)
  • Update staleness tests to only run over release branch (#18397) (78e1c09)

Protocol Buffers v29.3

08 Jan 21:06
Compare
Choose a tag to compare

Announcements

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

C++

  • Fix cmake installation location of java and go features (#19773) (1dc5842)

Other

  • Add .bazeliskrc for protobuf repo to tell bazelisk to use 7.1.2 by default. (#19884) (9a5d2c3)
  • Update artifact actions to v4 (#19703) (8e7e6b0)

Protocol Buffers v29.2

18 Dec 14:54
Compare
Choose a tag to compare

Announcements

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

C++

Java

Other

  • Export environment variables so bazelisk picks them up (#19690) (8b9d76c)
  • Pin staleness check to Bazel 7 (#19689) (a1c9b6a)
  • Remove CMake downgrade workaround from Windows CI tests (#19630) (3a7bb4a)

Protocol Buffers v29.1

04 Dec 16:42
Compare
Choose a tag to compare

Announcements

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

Java

Kotlin

Python

  • Revert "Remove deprecated service.py usages from test". For 29.x only (#19434) (5864b50)

Protocol Buffers v29.0

27 Nov 18:47
Compare
Choose a tag to compare

Announcements

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

Bazel

  • Add missing line to docstring after Args (#19213) (6f310d5)
  • Fix proto_info_bzl (#18918) (083de5f)
  • Use rules_cc everywhere in protobuf (ddadd0b)
  • Upgrade rules_cc to 0.0.13 (3dd4835)
  • Convert proto toolchain string to Label (aa181e2)
  • Prepare supporting targets for testing (a748b10)
  • Support --incompatible_enable_proto_toolchain_resolution (372ddb3)
  • Move ProtoInfo and ProtoLangToolchainInfo from Bazel (426ca8a)
  • Move java_{lite_}proto_library from Bazel repository (d77bdac)
  • Move proto_toolchain from rules_proto to protobuf (9f9cb7a)
  • Move proto_library from Bazel repository (3ff2cf0)
  • Move proto_common implementation from Bazel binary (b19fbe6)

Compiler

  • Begin adding extension numbers to SourceCodeInfo and FileDescriptorSet for tooling purposes. (07e489d)
  • Update protoc release to include editions language features proto for Go (#19013) (63d966b)
  • Introduce lifetimes for individual feature values. (0b6e768)
  • Windows - Fix handling of utf8 command line arguments (#17854) (b9d1800)
  • Limit feature deprecation warnings to reduce noise. (5cd9a46)

C++

  • Fix C++ ifndef_guard printer to also convert "-" to "_". (7331b77)
  • Fix C++ codegen namespace printer to print closing namespaces in reverse order. (3bf9c40)
  • Fix raw_ptr.cc on exotic architectures (#18193) (63f6262)
  • Fix cord handling in DynamicMessage and oneofs. (9e8b30c)
  • Fix packed reflection handling bug in edition 2023. (4c92328)
  • Add JsonStreamToMessage method (0259cc3)
  • Introduce lifetimes for individual feature values. (0b6e768)
  • Insert software prefetches into merge functions. This improves performance when hardware prefetchers are disabled on AMD machines. (d993365)
  • Insert software prefetches into proto parsing functions. This improves performance when hardware prefetchers are disabled on AMD platforms. (8aa0add)
  • Add prefetching of subsequent extensions in ExtensionSet::ForEach. (9b019ee)
  • Remove the AnyMetadata class and use free functions instead. (920d5c3)
  • Add [[deprecated]] attribute when generating enums and classes. (23aada2)
  • Use linear search instead of binary search in flat mode of ExtensionSet. (0ed61f0)
  • Prepare MessageLite::GetTypeName to be upgraded to return (30a8ef5)
  • Limit feature deprecation warnings to reduce noise. (5cd9a46)
  • Add Compiler Condition to use inline assembly optimizations with ARM64 for Compatibility with MSVC (#17671) (c5f6231)
  • Enable small object optimization (SOO) for RepeatedField in order to reduce data indirections. (e2525e6)
  • Return backing array memory to arena in ExtensionSet. (5ac8ee1)
  • In edition 2024, Enum_Name(value) functions return absl::string_view by default. (e3fa6aa)
  • Add Prefetchers to Proto Copy Construct to help address load misses (cdb7238)
  • Reduced nesting in GenerateByteSize: slight readability improvements in generated code. (162a740)
  • Introduce FieldDescriptor::cpp_string_type() API to replace direct ctype inspection which will be removed in the next breaking change (d0e49df)
  • Update the comment of TextFormat::Printer::RegisterMessagePrinter that the method takes ownerhip of the printer pointer. (d911161)
  • Prepare the code for migrating return types from const std::string& to (e13b8e9)

Java

  • Remove deprecation warnings for Timestamp and Duration add/subtract/between that we do not yet have alternatives to. (f606c13)
  • [29.x] Add missing java load (#19016) (bb287be)
  • Give Kotlin jars an OSGi Manifest (#18812) (0c51eba)
  • Re-export includingDefaultValueFields in deprecated state for important Cloud customer. (7321b2f)
  • Restore compatibility with 3.22 gencode by re-adding mutableCopy helpers (1b1e90b)
  • Speed up CodedOutputStream by extracting rarely-executed string formatting code (f8f5136)
  • Return constant Value objects for true, false, and "" (4fbb0c5)
  • Optimise CodedOutputStream.ArrayEncoder.writeFixed32NoTag/writeFixed64NoTag (a51f98c)
  • CodedOutputStream: avoid updating position to go beyond end of array. (76ab5f2)
  • Convert IndexOutOfBoundsException to OutOfSpaceException in UnsafeDirectNioEncoder (0e75d92)
  • Suppress ReturnValueIgnored errorprone issues (bbbc7b9)
  • Fix packed reflection handling bug in edition 2023. (4c92328)
  • Move cc_proto_library from Bazel repository (5254448)
  • Protobuf Lite ArrayLists: Defer allocating backing array until we have some idea how much to allocate. (05a8a40)
  • Allocate correct-sized array when parsing packed fixed-width primitives (4e8469c)
  • Bugfix: Make extensions beyond n=16 immutable. (ee419f2)
  • Reserve capacity in ProtobufArrayList when calling Builder.addAllRepeatedMessage(Collection) (e3cc31a)
  • Avoid allocating iterators when calling Message.Builder.addAllFoo(RandomAccess List) (bd1887e)
  • Remove the AnyMetadata class and use free functions instead. (https://github.com/protocolbuffers/protobuf/com...
Read more

Protocol Buffers v29.0-rc3

18 Nov 22:27
Compare
Choose a tag to compare
Pre-release

Announcements

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

Bazel

Compiler

  • Begin adding extension numbers to SourceCodeInfo and FileDescriptorSet for tooling purposes. (07e489d)
  • Update protoc release to include editions language features proto for Go (#19013) (63d966b)

Java

  • Remove deprecation warnings for Timestamp and Duration add/subtract/between that we do not yet have alternatives to. (f606c13)
  • [29.x] Add missing java load (#19016) (bb287be)

Csharp

  • Begin adding extension numbers to SourceCodeInfo and FileDescriptorSet for tooling purposes. (07e489d)

Python

  • Fix a python bug when assign an empty Struct at creation. (#18977) (bb0d575)
  • Add a deprecation warning to py_proto_library (#19032) (53cde64)

PHP

PHP C-Extension

  • Fixed non-conformance in JSON parsing for empty strings in numeric fields. (#19259) (b69ea96)
  • See also UPB changes below, which may affect PHP C-Extension.

Ruby

  • Fixed non-conformance in JSON parsing for empty strings in numeric fields. (#19259) (b69ea96)

Ruby C-Extension

  • Fixed non-conformance in JSON parsing for empty strings in numeric fields. (#19259) (b69ea96)
  • See also UPB changes below, which may affect Ruby C-Extension.

UPB (Python/PHP/Ruby C-Extension)

  • Fixed non-conformance in JSON parsing for empty strings in numeric fields. (#19259) (b69ea96)

Other

  • Upgrade rules_cc 0.0.15 and rules_java 8.3.1 (#19215) (fb8ee79)

Protocol Buffers v29.0-rc2

23 Oct 20:40
Compare
Choose a tag to compare
Pre-release

Announcements

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

Bazel

  • Fix proto_info_bzl (#18918) (083de5f)
  • Use rules_cc everywhere in protobuf (ddadd0b)
  • Upgrade rules_cc to 0.0.13 (3dd4835)
  • Convert proto toolchain string to Label (aa181e2)
  • Prepare supporting targets for testing (a748b10)

Java

  • Give Kotlin jars an OSGi Manifest (#18812) (0c51eba)
  • Re-export includingDefaultValueFields in deprecated state for important Cloud customer. (7321b2f)
  • Restore compatibility with 3.22 gencode by re-adding mutableCopy helpers (1b1e90b)

Kotlin

Python

  • Load Python rules everywhere in protobuf (a18f0de)

UPB (Python/PHP/Ruby C-Extension)

  • Load Python rules everywhere in protobuf (a18f0de)

Other

  • Upgrade rules_java and remove experimental_google_legacy_api flag (#18889) (f25389b)
  • Replace use of C++17 with disabling a warning (111584f)
  • Load Shell rules everywhere in protobuf (1822c8a)
  • Fix Bazel dependency cycle issue affecting Kythe (#18768) (6df33a4)
  • Remove rules_rust dependency (4329b89)
  • Remove release branch staleness tests. (3551ee3)
  • Remove javaopts requiring java8 in non-release builds. (98beac0)

Protocol Buffers v28.3

22 Oct 23:36
Compare
Choose a tag to compare

Announcements

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

C++

  • Fix packed reflection handling bug in edition 2023. (#18405) (c4124f9)

Java

  • Mute the minor version warning #18096 (#18923) (fe30f9a)
  • Populate Kotlin Manifest Files (#18859) (d82fb47)
  • Re-export includingDefaultValueFields in deprecated state for important Cloud customer. (3b62d78)
  • Cherrypick restoration of mutableCopy helpers (3ea568a)
  • Fix packed reflection handling bug in edition 2023. (#18405) (c4124f9)

Kotlin

Python

Other

  • Fix merge conflicts (664a7e1)
  • [ObjC] Disabling visionOS on CI. (22cd8ba)
  • Update staleness tests to only run over release branch (#18398) (8e94b14)

Protocol Buffers v29.0-rc1

30 Sep 22:55
Compare
Choose a tag to compare
Pre-release

Announcements

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

Bazel

  • Support --incompatible_enable_proto_toolchain_resolution (372ddb3)
  • Move ProtoInfo and ProtoLangToolchainInfo from Bazel (426ca8a)
  • Move java_{lite_}proto_library from Bazel repository (d77bdac)
  • Move proto_toolchain from rules_proto to protobuf (9f9cb7a)
  • Move proto_library from Bazel repository (3ff2cf0)
  • Move proto_common implementation from Bazel binary (b19fbe6)

Compiler

  • Introduce lifetimes for individual feature values. (0b6e768)
  • Windows - Fix handling of utf8 command line arguments (#17854) (b9d1800)
  • Limit feature deprecation warnings to reduce noise. (5cd9a46)

C++

  • Fix C++ ifndef_guard printer to also convert "-" to "_". (7331b77)
  • Fix C++ codegen namespace printer to print closing namespaces in reverse order. (3bf9c40)
  • Fix raw_ptr.cc on exotic architectures (#18193) (63f6262)
  • Fix cord handling in DynamicMessage and oneofs. (9e8b30c)
  • Fix packed reflection handling bug in edition 2023. (4c92328)
  • Add JsonStreamToMessage method (0259cc3)
  • Introduce lifetimes for individual feature values. (0b6e768)
  • Insert software prefetches into merge functions. This improves performance when hardware prefetchers are disabled on AMD machines. (d993365)
  • Insert software prefetches into proto parsing functions. This improves performance when hardware prefetchers are disabled on AMD platforms. (8aa0add)
  • Add prefetching of subsequent extensions in ExtensionSet::ForEach. (9b019ee)
  • Remove the AnyMetadata class and use free functions instead. (920d5c3)
  • Add [[deprecated]] attribute when generating enums and classes. (23aada2)
  • Use linear search instead of binary search in flat mode of ExtensionSet. (0ed61f0)
  • Prepare MessageLite::GetTypeName to be upgraded to return (30a8ef5)
  • Limit feature deprecation warnings to reduce noise. (5cd9a46)
  • Add Compiler Condition to use inline assembly optimizations with ARM64 for Compatibility with MSVC (#17671) (c5f6231)
  • Enable small object optimization (SOO) for RepeatedField in order to reduce data indirections. (e2525e6)
  • Return backing array memory to arena in ExtensionSet. (5ac8ee1)
  • In edition 2024, Enum_Name(value) functions return absl::string_view by default. (e3fa6aa)
  • Add Prefetchers to Proto Copy Construct to help address load misses (cdb7238)
  • Reduced nesting in GenerateByteSize: slight readability improvements in generated code. (162a740)
  • Introduce FieldDescriptor::cpp_string_type() API to replace direct ctype inspection which will be removed in the next breaking change (d0e49df)
  • Update the comment of TextFormat::Printer::RegisterMessagePrinter that the method takes ownerhip of the printer pointer. (d911161)
  • Prepare the code for migrating return types from const std::string& to (e13b8e9)

Java

  • Speed up CodedOutputStream by extracting rarely-executed string formatting code (f8f5136)
  • Return constant Value objects for true, false, and "" (4fbb0c5)
  • Optimise CodedOutputStream.ArrayEncoder.writeFixed32NoTag/writeFixed64NoTag (a51f98c)
  • CodedOutputStream: avoid updating position to go beyond end of array. (76ab5f2)
  • Convert IndexOutOfBoundsException to OutOfSpaceException in UnsafeDirectNioEncoder (0e75d92)
  • Suppress ReturnValueIgnored errorprone issues (bbbc7b9)
  • Fix packed reflection handling bug in edition 2023. (4c92328)
  • Move cc_proto_library from Bazel repository (5254448)
  • Protobuf Lite ArrayLists: Defer allocating backing array until we have some idea how much to allocate. (05a8a40)
  • Allocate correct-sized array when parsing packed fixed-width primitives (4e8469c)
  • Bugfix: Make extensions beyond n=16 immutable. (ee419f2)
  • Reserve capacity in ProtobufArrayList when calling Builder.addAllRepeatedMessage(Collection) (e3cc31a)
  • Avoid allocating iterators when calling Message.Builder.addAllFoo(RandomAccess List) (bd1887e)
  • Remove the AnyMetadata class and use free functions instead. (920d5c3)
  • Add [[deprecated]] attribute when generating enums and classes. (23aada2)
  • Binary compatibility shims for GeneratedMessageV3, SingleFieldBuilderV3, RepeatedFieldBuilderV3, and their nested classes to restore binary compatibility with <=v3.x.x generated code built against v3.x.x prior to v4.26.0 breaking release. (df8a11e)
  • Implement a mechanism to control the output format of Message.toString within a Runnable instance. (737803e)
  • Fix TextFormat.Parser to appropriately handle unknown values for open enums (df1aad4)
  • Inline ArrayList's array into SmallSortedMap (910f627)
  • Deprecated unused/obsolete mutable APIs, to be removed in next breaking change. (e889b0b)

Kotlin

  • Support building //java with bzlmod (507ba36)
  • Replace deprecated use of toBytes() with Character property .code (#18236) (5d9deab)

Objective-C

Read more