protoc: support identifiers as reserved names in addition to string literals (only in editions)#13471
protoc: support identifiers as reserved names in addition to string literals (only in editions)#13471jhump wants to merge 2 commits intoprotocolbuffers:mainfrom
Conversation
|
Np, thanks Joshua! |
|
After discussing this a bit with the team, I think we can make this a stronger condition. Under editions, we can require the new syntax, since there's a simple no-op transformation for prototiller to upgrade to during the edition migration |
Ah, very good idea! I'll have that change pushed pretty soon. |
|
@mkruskal-google, I think this is ready for another look. Editions now requires identifiers. The error message for when a user gets it backwards (e.g. tries to use an identifier in proto2 or proto3 or a string literal in editions) should be very clear now, too. |
|
Awesome lgtm, thanks for the contribution! |
…iterals (only in editions) (#13471) This addresses #13440. @mkruskal-google, I saw you are assigned the above issue. I hope it's okay that I took a stab at it. Closes #13471 COPYBARA_INTEGRATE_REVIEW=#13471 from jhump:jh/reserved-names-support-identifiers a23f18e FUTURE_COPYBARA_INTEGRATE_REVIEW=#13471 from jhump:jh/reserved-names-support-identifiers a23f18e PiperOrigin-RevId: 555559034
…iterals (only in editions) (#13471) This addresses #13440. @mkruskal-google, I saw you are assigned the above issue. I hope it's okay that I took a stab at it. Closes #13471 COPYBARA_INTEGRATE_REVIEW=#13471 from jhump:jh/reserved-names-support-identifiers a23f18e FUTURE_COPYBARA_INTEGRATE_REVIEW=#13471 from jhump:jh/reserved-names-support-identifiers a23f18e PiperOrigin-RevId: 555559034
…iterals (only in editions) (#13471) This addresses #13440. @mkruskal-google, I saw you are assigned the above issue. I hope it's okay that I took a stab at it. Closes #13471 COPYBARA_INTEGRATE_REVIEW=#13471 from jhump:jh/reserved-names-support-identifiers a23f18e FUTURE_COPYBARA_INTEGRATE_REVIEW=#13471 from jhump:jh/reserved-names-support-identifiers a23f18e PiperOrigin-RevId: 555559034
…es (#176) This implements the use of identifiers, instead of string literals, in `reserved` statements. This new syntax is for editions; proto2 and proto3 continue to use string literals for backwards compatibility. This effectively ports protocolbuffers/protobuf#13471 to protocompile.
This addresses #13440.
@mkruskal-google, I saw you are assigned the above issue. I hope it's okay that I took a stab at it.