Such an option set on a field with the type google.protobuf.Empty should not compile because enclosing message could not be built using the generated validation code.
When checking for a filled in value, we compare the value with a default instance of a message, and the result would be always true.
This also should include implicitly required field such as IDs for command messages or entity states.
A similar error should be produced for repeated or map fields with Empty when (required) option is set. Such fields does not make much sense because they'd store just Empty's. But we still need to address this corner case.
Such an option set on a field with the type
google.protobuf.Emptyshould not compile because enclosing message could not be built using the generated validation code.When checking for a filled in value, we compare the value with a default instance of a message, and the result would be always
true.This also should include implicitly required field such as IDs for command messages or entity states.
A similar error should be produced for
repeatedormapfields withEmptywhen(required)option is set. Such fields does not make much sense because they'd store justEmpty's. But we still need to address this corner case.