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

Fix decoding of proto3 optional zero/default values #302

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

sindrip
Copy link
Contributor

@sindrip sindrip commented Aug 17, 2022

Currently with proto3 optional values, a zero/default value is skipped. This means that decode(encode(msg)) is not identity for all messages with proto3 optional fields.

This PR ensures that only nil values for proto3_optional fields are skipped.

@whatyouhide whatyouhide merged commit a1a65b0 into elixir-protobuf:main Aug 19, 2022
@whatyouhide
Copy link
Collaborator

Thanks @sindrip! 💟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants