wechaty / grpc

gRPC Service & Protocol Buffers for Wechaty Puppet
https://wechaty.github.io/grpc/
Apache License 2.0
25 stars 22 forks source link

Proto 3.15 supports `optional` again! #109

Open huan opened 3 years ago

huan commented 3 years ago

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

Blockers

More details

yoheimuta commented 2 years ago

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.