-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
protoc: validate custom json_name configuration #10581
protoc: validate custom json_name configuration #10581
Conversation
- also, include check for default JSON name conflicts even in proto2 files (but only warn) - if custom JSON name conflicts with other default name, only a warning in proto2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback! I'll ping here again after I push revisions to address them.
also moves helpers into anonymous namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcy, I think this is ready for another look.
ping @mcy, if you have a chance to make another pass over this |
d5b14c8
to
c7ba055
Compare
@mcy, I think I've addressed your latest comments. PTAL. |
…me-validation protoc: validate custom json_name configuration
This makes a few other related changes, for consistency:
When checking custom JSON names, this considers it an error even in proto2 if two
json_name
options conflict. However, if ajson_name
option conflicts with a default JSON name, it is just a warning in proto2 (aligns with the existing check and the similar check for enum value names).Fixes #5063.