google-cloud-cpp icon indicating copy to clipboard operation
google-cloud-cpp copied to clipboard

Reconsider whether the lack/addition of an explicit optional keyword indicates a change in field type

Open scotthart opened this issue 1 year ago • 1 comments

When comparing the current generation of a proto file to the discovery document being parsed, in DiscoveryTypeVertex::GetFieldNumber we interrogate the existence of the optional keyword in the .proto file as a criteria as to whether or not we can reuse the field number. As these proto files use proto3 syntax, this check may be superfluous and fields with and without the optional keyword may be equivalent. This issue was motivated by protobuf deprecating has_optional_keyword in favor of has_presence. has_presence treats the fields as equivalent.

scotthart avatar Feb 12 '24 17:02 scotthart

This would be nice to resolve. Preferably if we can prove to ourselves that the type doesn't change.

scotthart avatar Aug 21 '24 19:08 scotthart