Protocol Buffers 27.0 已经发布。Protocol Buffers(protobuf)是 Google 开源的语言无关、平台无关的可扩展机制,用于序列化结构化数据。
具体更新内容包括:
Announcements
Compiler
C++
- 修复文本格式分隔字段处理。(29c69ff)
- 允许 2023 版使用
string_type。(d8251eb)
- 破坏性变化:确保使用 aligned
operator new分配 overaligned types。(11ef0ff)
- Python JSON 解析器:如果设置了
ignore_unknown_fields,则忽略无效的枚举字符串值( #15887 ) ( 86abf35 )
- 将
java_features.proto移至java/core/srce/main/resources( 274bc7f )
- 为 C++ codegen 添加 RAII namespace printer helper。(8599ab5)
- 启用对 Java Lite 的版本支持。(500c953)
- 为 C++ codegen 添加 RAII
ifndefhelper。( 1087274)
- 在所有 Ruby 运行时中实现 2023 版本支持。(bca8fb6)
- 发布版本默认 CLI 参数。(7a0e10e)
- 弃用
Arena::CreateMessage for OSS。(d4bfe52)
- ......
Java
- 延迟解析 proto2 和 proto3 的特性,以便与不从 gencode static init 调用特性解析的旧开源 gencode 兼容。( #16907 )( 4483c6b )
- 弃用使用 Maven 从源代码构建的功能,该功能将在 4.28.x 中删除。(51b48a4)
- 拆分引导
java_features.proto以防止泄漏。(d56cb7d)
- 将 Java 生成器重构为单独的包和目标。(bd81fd9)
- 在
StreamDecoder中读取字符串或字节时检查大小是否为非负数。(a94f57b)
- 修复文本格式分隔字段处理(29c69ff)
- 在
kotlin_mvnrelease 中添加java_features.proto ( 369732a )
- 向 Java 解析器添加一个新
includingDefaultValueWithoutPresenceFields选项,旨在替换当前的includingDefaultValueFields。(58baeb4)
- ......
更多详情可查看:https://github.com/protocolbuffers/protobuf/releases/tag/v27.0