grpc
grpc copied to clipboard
Proto 3.15 supports `optional` again!
According to https://stackoverflow.com/a/62566052/1123955, we can get rid of the wrapper in our protos.
Presence tracking was added to proto3 in response to user feedback, both from inside Google and from open-source users. The proto3 wrapper types were previously the only supported presence mechanism for proto3. Users have pointed to both efficiency and usability issues with the wrapper types.
See: https://github.com/protocolbuffers/protobuf/blob/v3.12.0/docs/implementing_proto3_presence.md#background
This change will be a BREAKING CHANGE so it should be discussed later.
Useful Resources
- Google protobuf: if I add a field from one side will it break another one?
- Protobufs: Updating A Message Type
Blockers
- [x] gen-grpc-gateway, gen-openapiv2: add support for proto3 optional
- https://github.com/grpc-ecosystem/grpc-gateway/pull/1951
- Released v2.3.0 (2021-02-25)
- [x] Failed to generate pb file when using proto3 version.
- [x] grpc_tools_node_protoc_ts
- https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/88
- [ ] protoc-gen-lint
- https://github.com/ckaznocha/protoc-gen-lint/issues/20
- [x] ts-protoc-gen (web gRPC)
- https://github.com/improbable-eng/ts-protoc-gen/issues/263
More details
Hi, I stumbled upon this issue while tackling the similar problem: yoheimuta/protolint#234.
FWIW, protoc-gen-protolint supports proto3 optional. Moreover, protoc-gen-protolint is meant to be a drop-in replacement of protoc-gen-lint. I hope your blocker issue will be resolved soon.