Skip to content

Conversation

@cheng81
Copy link

@cheng81 cheng81 commented Dec 4, 2019

The current implementation mistakenly uses reserved_numbers tuples coming from gpb as proto3_msg, since the name in the tuple matches the one used in the proper message definition.
The commit simply skips over those tuples, since to the best of my knowledge they are useless in the generated code: those fields are by definition not mentioned in the protobuf message, hence they will never be either written or read.
This PR addresses #81

@cheng81 cheng81 changed the title filter tuples when converting from gpb representation filter reserved_numbers and reserved_names tuples when converting from gpb representation Dec 5, 2019
@cheng81
Copy link
Author

cheng81 commented Dec 5, 2019

I seriously can't find any valid reason to keep the {{:reserved_numbers, _}, _} and {{:reserved_names, _}, _} around, so in the latest commit I just filter them out in Protobuf.Parser directly, so they don't ever creep up in other parts of the code.

@cheng81
Copy link
Author

cheng81 commented Dec 9, 2019

@bitwalker any chance we can get this reviewed?

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.

1 participant