-
Hello, The protocol buffer specs started evolving again recently, with a new versioning system called editions. Edition 2023 was released some time ago and a 2024 one is planned in the near future. Currently, using edition syntax with this project triggers an error.
Is there a way to use editions with the current codebase that is not obvious, like by passing specific options or calling the plugin in a specific way? If not, is there any plan to add support to this project? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey Johann, protobuf-es embeds minimal field info in the generated code - just the bare minimum to support serialization and custom options. In editions, features can be inherited to child elements, and the field info we're embedding is not well suited for this model. There is a Protobuf implementation that supports editions: https://github.com/bufbuild/protobuf-es. The plan for protobuf-ts is to switch code generation to the plugin framework of protobuf-es. This will shed a lot of dead weight from this repository, but there hasn't been much progress. Long term, it would be great to use more parts of protobuf-es under the hood, possibly including editions. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer. I assume the first paragraph is a typo and you're actually talking about protobuf-ts? |
Beta Was this translation helpful? Give feedback.
Hey Johann, protobuf-es embeds minimal field info in the generated code - just the bare minimum to support serialization and custom options. In editions, features can be inherited to child elements, and the field info we're embedding is not well suited for this model.
There is a Protobuf implementation that supports editions: https://github.com/bufbuild/protobuf-es. The plan for protobuf-ts is to switch code generation to the plugin framework of protobuf-es. This will shed a lot of dead weight from this repository, but there hasn't been much progress. Long term, it would be great to use more parts of protobuf-es under the hood, possibly including editions.