protoc: validate custom json_name configuration#10581
Merged
mcy merged 7 commits intoprotocolbuffers:mainfrom Sep 22, 2022
Merged
protoc: validate custom json_name configuration#10581mcy merged 7 commits intoprotocolbuffers:mainfrom
mcy merged 7 commits intoprotocolbuffers:mainfrom
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
mcy
reviewed
Sep 15, 2022
jhump
commented
Sep 15, 2022
Contributor
Author
jhump
left a comment
There was a problem hiding this comment.
Thanks for the feedback! I'll ping here again after I push revisions to address them.
also moves helpers into anonymous namespace
jhump
commented
Sep 15, 2022
Contributor
Author
|
ping @mcy, if you have a chance to make another pass over this |
fowles
reviewed
Sep 20, 2022
mcy
reviewed
Sep 20, 2022
d5b14c8 to
c7ba055
Compare
Contributor
Author
|
@mcy, I think I've addressed your latest comments. PTAL. |
mcy
approved these changes
Sep 22, 2022
mkruskal-google
added a commit
to mkruskal-google/protobuf
that referenced
this pull request
Sep 26, 2022
bithium
pushed a commit
to bithium/protobuf
that referenced
this pull request
Sep 4, 2023
…me-validation protoc: validate custom json_name configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_nameoptions conflict. However, if ajson_nameoption 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.