Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support encode zero value in protobuf to adjust to go proto2 #274

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

Ggiggle
Copy link
Contributor

@Ggiggle Ggiggle commented Oct 17, 2024

Motivation

The go version proto2 will encode the zero value for basic types, while rust version wouldn't do this.
By the proto definition, only proto3 has explicitly define this behavior, so both process for proto2 is reasonable.
However, in some cases, the data obtained by the serialization method used in pilota cannot be correctly parsed by other upstream or downstream deserialization methods.

Solution

So we plan to provide a feature switch to support enabling serialization of zero values.

@Ggiggle Ggiggle requested review from a team as code owners October 17, 2024 13:18
@Ggiggle Ggiggle merged commit cc9b6c8 into main Oct 17, 2024
11 checks passed
@Ggiggle Ggiggle deleted the feat/pb_encode_zero branch October 17, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants