v28.0-rc1
版本发布时间: 2024-07-12 07:47:41
protocolbuffers/protobuf最新发布版本:v28.1(2024-09-12 01:21:10)
Announcements
- Protobuf News may include additional announcements or pre-announcements for upcoming changes.
Compiler
- UPB text encoder without using reflection for Rust (used for a message's Debug trait) that will print out field number to value entries instead of field name to value entries of a message like how it's expected for the usual text format using reflection. (https://github.com/protocolbuffers/protobuf/commit/f9dd9ce66e05d034378b4b37b82307f41fc3395c)
- Enable MessageLite::DebugString to use Message::DebugString where possible. (https://github.com/protocolbuffers/protobuf/commit/f810cc5b668d78cb982f44b34f188160d55c27d6)
- Always report plugin support errors from protoc. (https://github.com/protocolbuffers/protobuf/commit/986ef8d80bb9432ec7c3a83f0988e2cc589d5cee)
- Stop supporting EDITION_PROTO2 as an alias for EDITION_LEGACY. (https://github.com/protocolbuffers/protobuf/commit/35b34252c79d661fb1e9ceecdc6457295f28b9b1)
- Rename
DynamicCastToGenerated
/DownCastToGenerated
to (https://github.com/protocolbuffers/protobuf/commit/18da465815e609732b902d8cbc79d2d12e90686d) - Mark deleted fields in descriptor.proto reserved (https://github.com/protocolbuffers/protobuf/commit/44c409d211900f153a4bbafbaca474401ddec4e9)
- Protoc: support inf, -inf, nan, and -nan in option values (#15017) (https://github.com/protocolbuffers/protobuf/commit/3c03e9351c57081d0dffae120ed37497017f105c)
C++
- Removed specific MSVC settings when installing (#17285) (https://github.com/protocolbuffers/protobuf/commit/770090e901872f860c8c75b55b9df3253ab2de6f)
- Omit the
_raw_default_instance_
declaration when using DLL linkage. (https://github.com/protocolbuffers/protobuf/commit/79c55cb30f79b227029fbe4cc62a14354c18096d) - Enable MessageLite::DebugString to use Message::DebugString where possible. (https://github.com/protocolbuffers/protobuf/commit/f810cc5b668d78cb982f44b34f188160d55c27d6)
- Fix a bug in which proto code uses ctype instead of string_type internally. (https://github.com/protocolbuffers/protobuf/commit/dfbe98781c5ac2c427aa4406705f8201c7364fcf)
- Add an optimization that prevents an exponential number of comparisons on deeply (https://github.com/protocolbuffers/protobuf/commit/594a71f48515715d37a797252e0dd2d97e635826)
- Replace FindHelper() with BucketNumber() when only the bucket number is required. (https://github.com/protocolbuffers/protobuf/commit/8c7b1ecd23aea88939d0e87efe7f2fd889ac40ce)
- Stop supporting EDITION_PROTO2 as an alias for EDITION_LEGACY. (https://github.com/protocolbuffers/protobuf/commit/35b34252c79d661fb1e9ceecdc6457295f28b9b1)
- Rename
DynamicCastToGenerated
/DownCastToGenerated
to (https://github.com/protocolbuffers/protobuf/commit/18da465815e609732b902d8cbc79d2d12e90686d) - Prohibit using features in the same file they're defined in. (https://github.com/protocolbuffers/protobuf/commit/24b91a7fec2fae2ee633c6bd2600ec2ebbe72f3f)
- Implement new Debug API with redaction. (https://github.com/protocolbuffers/protobuf/commit/bb68eb22dde9fbefc0413b7c3f836b03d062df4c)
- Use bool HasHasbits(const FieldDescriptor*) instead of manual checks. (https://github.com/protocolbuffers/protobuf/commit/448e326200a69afd83ae86e44dcddb612f007763)
- Add
java
to reserved names to escape extensions tojava_
. This may break existing references to gencode for extensions namedjava
. (https://github.com/protocolbuffers/protobuf/commit/c99cf4bbfaf71f735cd0dea7d6fc0b2c1a589ed2) - Put arena cleanup nodes on a separate chunked list instead of at the ends of arena blocks. (https://github.com/protocolbuffers/protobuf/commit/f70d90b4743dd9eed05e5bf33ef7196a99894e29)
- Fix validation checks of implicit presence. (https://github.com/protocolbuffers/protobuf/commit/d6c283321e7b2e159a6b300522b3d9f850e7de40)
- Clarify map behaviors in editions. (https://github.com/protocolbuffers/protobuf/commit/0dbd99a41db54a1adcfdc0946e9b8b724739a6e5)
- Protoc: support inf, -inf, nan, and -nan in option values (#15017) (https://github.com/protocolbuffers/protobuf/commit/3c03e9351c57081d0dffae120ed37497017f105c)
Java
- Add overload for LazyStringArrayList.add(String): boolean (https://github.com/protocolbuffers/protobuf/commit/761d49a27067f74c56818e979b979bd3942a27cc)
- Hoist SmallSortedMap.getNumArrayEntries() outside loops over array entries (https://github.com/protocolbuffers/protobuf/commit/229c958a5c9417129942959c9819f7f4ffa4c8a3)
- Omit the
_raw_default_instance_
declaration when using DLL linkage. (https://github.com/protocolbuffers/protobuf/commit/79c55cb30f79b227029fbe4cc62a14354c18096d) - Java: Deprecate newExtensionWriter. (https://github.com/protocolbuffers/protobuf/commit/7122ba1d0a93532324ab29cf05bd3fa4fd99e45e)
- Immutable java: Use new lower-allocation extension serialization APIs from gencode (https://github.com/protocolbuffers/protobuf/commit/41514865ebe792ef0f1bfcebdbb2598fd398236d)
- Reserialize all unresolved features using java features from the generated pool in case of descriptors from the custom pool. (https://github.com/protocolbuffers/protobuf/commit/415a147189fff5417b18ecc515b8197a085a0d2c)
- Fix delimited inheritance in all languages. (https://github.com/protocolbuffers/protobuf/commit/8beb9705e495c57d55f6547c523d5817336ac35f)
- Full java runtime: Avoid allocating ArrayList iterators when serializing UnknownFieldSet (https://github.com/protocolbuffers/protobuf/commit/fac847c5c5d85524fb27e8fb4a4205286bb7c44c)
- Move back deprecation of java utf8 feature to 2024. (https://github.com/protocolbuffers/protobuf/commit/bd7078debcd40823ed29a0ab197435c82b248043)
- Reparse unknown features using extension registry containing Java features. (https://github.com/protocolbuffers/protobuf/commit/68d908768fc19a14ea2db39a24a8c04a23e29541)
- Remove field SmallSortedMap.maxArraySize (https://github.com/protocolbuffers/protobuf/commit/16e0a63077bbfe889b7150543c5f176e0f637682)
- Delete unused method SmallSortedSet.getOverflowEntriesDescending (https://github.com/protocolbuffers/protobuf/commit/c05be324da89b9fbdf3ef7adc26fb541a7352e98)
- Avoid allocating FieldSet iterator if FieldSet is empty (https://github.com/protocolbuffers/protobuf/commit/3ba72807a675424ccee05648f6baaf43c2bc339b)
- Lazily resolve features for proto2 and proto3 for compatibility with old open source gencode that does not invoke feature resolution from gencode static init. (https://github.com/protocolbuffers/protobuf/commit/11c27dfa4b4dd2f79b722897bc04a297c2a35c26)
- Implement new Debug API with redaction. (https://github.com/protocolbuffers/protobuf/commit/bb68eb22dde9fbefc0413b7c3f836b03d062df4c)
- Replace SmallSortedMap.EmptySet with equivalent Collections.emptySet() (https://github.com/protocolbuffers/protobuf/commit/c6e2778f9173ed925746197310f4d11e5f46df96)
- Add
java
to reserved names to escape extensions tojava_
. This may break existing references to gencode for extensions namedjava
. (https://github.com/protocolbuffers/protobuf/commit/c99cf4bbfaf71f735cd0dea7d6fc0b2c1a589ed2) - Avoid allocating TreeMap in UnknownFieldSet.Builder.asMap (https://github.com/protocolbuffers/protobuf/commit/4b7c2d43818a71e0c6975fcf3a1f1e0f1533ce3c)
- Avoid allocating iterator in TextFormat printing UnknownFieldSet (https://github.com/protocolbuffers/protobuf/commit/8c6e5b79636673435c9a8afe51dd2ffe4a2c7f4b)
- Add
null
to the list of reserved words. (https://github.com/protocolbuffers/protobuf/commit/510c1434ed16dadeeb64a3b841c9ada96e273573) - Add UnknownFieldSet.isEmpty (https://github.com/protocolbuffers/protobuf/commit/c56bddd7074d3c62c94ca494e2e9983dbc98da6d)
- Java full runtime: Avoid allocating when calling asMap on empty UnknownFieldSet (https://github.com/protocolbuffers/protobuf/commit/d0b016fcfcd00a0e48d006f06868b8fb9876974a)
- Return the default instance when parsing from an empty byte[]. (https://github.com/protocolbuffers/protobuf/commit/f5979918571af01751afa40d9c41cb6070f56f99)
- Deprecate building from source with Maven to be removed in 4.28.x. (https://github.com/protocolbuffers/protobuf/commit/4c8da99c4865bc7e07ec629c2d1ad32ac576554b)
- Java full runtime: Avoid allocating iterator if UnknownFieldSet's TreeMap is empty (https://github.com/protocolbuffers/protobuf/commit/4f12891b87a99ecabdc1e1039d0587094e9b57cd)
- Proto java full runtime: avoid allocating Integers accessing enum lists (https://github.com/protocolbuffers/protobuf/commit/cc79f776dcb09164e7a0b6c11951679244a7828b)
- Split bootstrapped java_features.proto to keep it from leaking out. (https://github.com/protocolbuffers/protobuf/commit/2257232676e60f1d06f8c9545c88d1a73a3a8f54)
- Java Proto lite: avoid boxing Integers accessing enum lists (https://github.com/protocolbuffers/protobuf/commit/fb054c8e4141b0fe50c33d237a6650d98a412de8)
- In the Kotlin DSL, reference builder methods with property syntax. (https://github.com/protocolbuffers/protobuf/commit/e9c9970eb4ac488d9fb94e8dea6945d3881c405d)
- Java Proto Lite: Serialize repeated enums without allocating (https://github.com/protocolbuffers/protobuf/commit/de6aba9f639ced3dce03310121aa69c914eb7b0e)
- Avoid boxing when serializing primitive lists in CodedOutputStreamWriter (https://github.com/protocolbuffers/protobuf/commit/eaee04d89719ed8e0fde96b6d37cf741d866f511)
Kotlin
- In the Kotlin DSL, reference builder methods with property syntax. (https://github.com/protocolbuffers/protobuf/commit/e9c9970eb4ac488d9fb94e8dea6945d3881c405d)
Csharp
- Fix delimited inheritance in all languages. (https://github.com/protocolbuffers/protobuf/commit/8beb9705e495c57d55f6547c523d5817336ac35f)
- Handle groups in C# JsonParser (#16970) (https://github.com/protocolbuffers/protobuf/commit/092cc15f9d615850e7580a744deb316ad2175870)
- Introduce
MessageDescriptor.IsMapType
in C# reflection to make it easier to tell whether a given message was generated by protoc for a map field. (https://github.com/protocolbuffers/protobuf/commit/047fc7673eb2a7373f7ad8f5b094de201d737b36) - C#: Fix discovery of oneof declarations in descriptor protos. (https://github.com/protocolbuffers/protobuf/commit/b50ff60967b595765244d22945aed184cafee68a)
Objective-C
- [ObjC] Add Swift helpers for
GPBUnknownFields
/GPBUnknownField
. (https://github.com/protocolbuffers/protobuf/commit/6750ed8cd8eb9f109847cebdea86189e4fe64638) - [ObjC] Introduce the new
GPBUnknownFields
type. (https://github.com/protocolbuffers/protobuf/commit/47f633eae687939fbb68af4661503685a8efd239) - Rename
DynamicCastToGenerated
/DownCastToGenerated
to (https://github.com/protocolbuffers/protobuf/commit/18da465815e609732b902d8cbc79d2d12e90686d)
Rust
- UPB text encoder without using reflection for Rust (used for a message's Debug trait) that will print out field number to value entries instead of field name to value entries of a message like how it's expected for the usual text format using reflection. (https://github.com/protocolbuffers/protobuf/commit/f9dd9ce66e05d034378b4b37b82307f41fc3395c)
- Enable MessageLite::DebugString to use Message::DebugString where possible. (https://github.com/protocolbuffers/protobuf/commit/f810cc5b668d78cb982f44b34f188160d55c27d6)
Python
- Nextgen Proto Pythonic API: Struct/ListValue assignment and creation (https://github.com/protocolbuffers/protobuf/commit/e17821cac1f84989ab280cd92063ba86c4e6770b)
- Fix delimited inheritance in all languages. (https://github.com/protocolbuffers/protobuf/commit/8beb9705e495c57d55f6547c523d5817336ac35f)
- Make bytearray work (again) (#16691) (https://github.com/protocolbuffers/protobuf/commit/eb67a91cacd7345f02b432d51e581ee31fd2ca54)
- Nextgen Proto Pythonic API: Timestamp/Duration assignment, creation and calculation (https://github.com/protocolbuffers/protobuf/commit/b690e729eb86d9f505d1c14692100bfc39809603)
- Update rules_python to 0.28.0 (https://github.com/protocolbuffers/protobuf/commit/e1bf1f048e783578bcbdaa4572ce3c93908b6494)
- Nextgen Proto Pythonic API: “Add-on” proto for length prefixed serialize/parse (https://github.com/protocolbuffers/protobuf/commit/3a9f0743ea8d82f489a65f7d087fa01d26ac5f56)
- Rename
DynamicCastToGenerated
/DownCastToGenerated
to (https://github.com/protocolbuffers/protobuf/commit/18da465815e609732b902d8cbc79d2d12e90686d) - Fixed printing of nan floats/doubles in Python. (https://github.com/protocolbuffers/protobuf/commit/f65108072bbedad2e590f038eb23b8ef2235c329)
- Nextgen Proto Pythonic API: “Add-on” proto for JSON serialize/parse (https://github.com/protocolbuffers/protobuf/commit/6c91de9de94e02f7b7e69bad1245f62035574429)
- Nextgen Proto Pythonic API: “Add-on” proto for serialize/parse (https://github.com/protocolbuffers/protobuf/commit/495ba7bcdbd806306f0dfab128b2081c17fd66fd)
- Use struct instead of ctype. allows the protobuf python library to work on cpython 3.11's new wasm target [1] (https://github.com/protocolbuffers/protobuf/commit/9de810acdc6e7e2bcac03d207632c0b9443596ea)
- Nextgen Proto Pythonic API: Add 'in' operator (https://github.com/protocolbuffers/protobuf/commit/24f27c3b88708a735968688d34aa02a28f403866)
- Automated rollback of commit f799af8bf5c1ff24fa4b6aedfeaef99ef09dd16e. (https://github.com/protocolbuffers/protobuf/commit/c4bf83b534e9736fe31e1f8ad6f640e316836ba5)
- Catch all the exceptions in python JSON ParseDict and raise (https://github.com/protocolbuffers/protobuf/commit/9cc5be12edd35ed51949427316fe4dbae2709852)
PHP
- Chore(php): conformance testing for edition (#16712) (https://github.com/protocolbuffers/protobuf/commit/01744cccae57ca934ab925e13d2eaaf93761b1f4)
PHP C-Extension
- Fix segmentation faults with enabled keep_descriptor_pool_after_request (#16993) (https://github.com/protocolbuffers/protobuf/commit/e844510ee30e25017e94f9f43751abab159208c8)
- See also UPB changes below, which may affect PHP C-Extension.
Ruby
- Remove
Arena_pin
in favor of adopting the UPB freezing API. (https://github.com/protocolbuffers/protobuf/commit/1194440c2489fc58051a245b5db74c0fd1bbf4b0) - Fix Ruby FFI to pass
MiniTable
toupb_Message_New()
akanew_message_from_def()
. (https://github.com/protocolbuffers/protobuf/commit/47f4bc958bc719b905942738470718f03ca70b33)
Ruby C-Extension
- [Ruby] Fix mismatched pointer type (#17240) (https://github.com/protocolbuffers/protobuf/commit/0aa74497527c6656e073f2635019ebc2a946268c)
- Remove
Arena_pin
in favor of adopting the UPB freezing API. (https://github.com/protocolbuffers/protobuf/commit/1194440c2489fc58051a245b5db74c0fd1bbf4b0) - See also UPB changes below, which may affect Ruby C-Extension.
UPB (Python/PHP/Ruby C-Extension)
- UPB text encoder without using reflection for Rust (used for a message's Debug trait) that will print out field number to value entries instead of field name to value entries of a message like how it's expected for the usual text format using reflection. (https://github.com/protocolbuffers/protobuf/commit/f9dd9ce66e05d034378b4b37b82307f41fc3395c)
- Fix delimited inheritance in all languages. (https://github.com/protocolbuffers/protobuf/commit/8beb9705e495c57d55f6547c523d5817336ac35f)
- Fixed printing of nan floats/doubles in Python. (https://github.com/protocolbuffers/protobuf/commit/f65108072bbedad2e590f038eb23b8ef2235c329)
Other
- Add minimal Python support to MODULE.bazel (https://github.com/protocolbuffers/protobuf/commit/2eb4d69ed51c475a77ecd62742ef5064557b531f)
- Fix(bazel/python): incompatible_enable_proto_toolchain_resolution (#17078) (https://github.com/protocolbuffers/protobuf/commit/8434c12d160fcf2f6adc572f4e94947fb57c82c3)
- Add Rust support to MODULE.bazel (https://github.com/protocolbuffers/protobuf/commit/f3c140f96c9a7cb59f02289261c70c91bb9c009f)
- Add rules_fuzzing dependency to MODULE.bazel. (https://github.com/protocolbuffers/protobuf/commit/a450c9cad090e3e607099cb379c62050bf15eb5f)
- Reenable FFI tests on CRuby. (https://github.com/protocolbuffers/protobuf/commit/e595749c9c15a50d3f402cb66b2e7630f4f13ec6)
- Update comment for message_type (https://github.com/protocolbuffers/protobuf/commit/023e69d6ccf07cfa8ce6afa695f26008be08e476)
- Enable textproto conformance tests for "-0" and "-0F". (https://github.com/protocolbuffers/protobuf/commit/13caa08692d522df8812b1c6f6a88c70105d3941)
- Fix #10007: Propagate msvc-style link flags to clang-cl with Bazel (https://github.com/protocolbuffers/protobuf/commit/55592a28e74e0eeabf89c3fd056ec0d81068a9a2)
- Add system_python to protobuf_deps.bzl. (https://github.com/protocolbuffers/protobuf/commit/8a11178606ce85d9e561729328795471fe8a6de5)
1、 protobuf-28.0-rc1.tar.gz 6.08MB
2、 protobuf-28.0-rc1.zip 7.76MB
3、 protoc-28.0-rc-1-linux-aarch_64.zip 3.07MB
4、 protoc-28.0-rc-1-linux-ppcle_64.zip 3.34MB
5、 protoc-28.0-rc-1-linux-s390_64.zip 3.95MB
6、 protoc-28.0-rc-1-linux-x86_32.zip 3.35MB
7、 protoc-28.0-rc-1-linux-x86_64.zip 3.08MB
8、 protoc-28.0-rc-1-osx-aarch_64.zip 2.13MB
9、 protoc-28.0-rc-1-osx-universal_binary.zip 4.3MB
10、 protoc-28.0-rc-1-osx-x86_64.zip 2.21MB
11、 protoc-28.0-rc-1-win32.zip 3.06MB
12、 protoc-28.0-rc-1-win64.zip 2.98MB