Details
-
Bug
-
Status: Resolved
-
P2
-
Resolution: Fixed
-
None
-
None
Description
Proto3 uses 0 as the default value for enums and does not encode it on the wire which means that you can not detect the difference between a value that is unset and an enum that is set but has a value of zero.
Defining an "YYY_UNSPECIFIED" is considered a best practice. Unfortunately this is not done automatically because of proto2 compatibility within proto3.