verify that reserved names are valid identifiers #65
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.
Currently (latest on master),
protoc
just warns when a reserved name is not a valid identifier. (Current release just ignores invalid names, just like buf does.) But I am hoping to land a change soon that will make it an actual error inprotoc
.(For the whole saga of the changes in
protoc
see protocolbuffers/protobuf#6335 and protocolbuffers/protobuf#10586.)This PR will make it an actual error to use an invalid name. This would be one of two known cases where buf is more strict than
protoc
(the other being that buf validates custom JSON names, butprotoc
does not... at least not yet: protocolbuffers/protobuf#5063). But both of these checks should be finding their way into aprotoc
release soon-ish.