Language-specific Protobuf code generation plugins typically work around such collisions by suffixing identifiers with an underscore. This PR proposes using the same convention to enable use of such reserved keywords as attribute names when creating Protobuf messages in Skycfg.
This enables the above example to be expressed as:
The Protobuf language permits identifiers that are reserved in Starlark, like
pass
. Consider, for example:There is currently no way to express this in Skycfg, since this is (correctly) flagged as a Starlark syntax error. For example:
Language-specific Protobuf code generation plugins typically work around such collisions by suffixing identifiers with an underscore. This PR proposes using the same convention to enable use of such reserved keywords as attribute names when creating Protobuf messages in Skycfg.
This enables the above example to be expressed as:
Verification
I updated the unit tests.