You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OSI violates several Protobuf Style Guide rules #711
Hi Martin,
at least for the pluralized repeated I think I can add to the discussion. We have talked about this several times in the past and one argument for not using a plural was that we had occasions in which we changed an optional message to a repeated message. The moment we then have to use a "s" at the end we would break compatibility which is why we thought it might be handy to just leave the singular.
Best regards
Carlo
The enum structure of OSI has been adapted to the need of the application. The first value is UNKNOWN and the second is OTHER
Those two are sematically somehow in combination UNCECIFIED:
UKNOWN means that it is unclear what the value means, it can be false, non existant in the interface and unsupported or anything else
OTHER means on the other hand that the reading was correct and that there is a clear unterstanding of what the value is but it is just not one of the values described in the ENUM. In this case e.g. an application could be missing a color and using other to represent the value and add the value for the next version of OSI.
Hi Martin, at least for the pluralized repeated I think I can add to the discussion. We have talked about this several times in the past and one argument for not using a plural was that we had occasions in which we changed an optional message to a repeated message. The moment we then have to use a "s" at the end we would break compatibility which is why we thought it might be handy to just leave the singular. Best regards Carlo
Hi Carlo,
Thank you for the clarification.
Just to be clear, I am not calling for blindly following every rule in the Style Guide.
This specific exception is well documented, which is totally fine in my opinion.
The enum structure of OSI has been adapted to the need of the application. The first value is UNKNOWN and the second is OTHER
Those two are sematically somehow in combination UNCECIFIED:
UKNOWN means that it is unclear what the value means, it can be false, non existant in the interface and unsupported or anything else
OTHER means on the other hand that the reading was correct and that there is a clear unterstanding of what the value is but it is just not one of the values described in the ENUM. In this case e.g. an application could be missing a color and using other to represent the value and add the value for the next version of OSI.
Again, thank you for the clarification.
The reason for the rule is stated as
The zero value enum should have the suffix UNSPECIFIED, because a server or application that gets an unexpected enum value will mark the field as unset in the proto instance. The field accessor will then return the default value, which for enum fields is the first enum value.
This is basically what UNKNOWN is for in OSI, right?
I'll update the example .protolint.yml above to reflect that exception.
Activity
jdsika commentedon Feb 13, 2023
Hi Martin,
at least for the pluralized repeated I think I can add to the discussion. We have talked about this several times in the past and one argument for not using a plural was that we had occasions in which we changed an optional message to a repeated message. The moment we then have to use a "s" at the end we would break compatibility which is why we thought it might be handy to just leave the singular.
Best regards
Carlo
jdsika commentedon Feb 13, 2023
The enum structure of OSI has been adapted to the need of the application. The first value is
UNKNOWNand the second isOTHERThose two are sematically somehow in combination
UNCECIFIED:UKNOWNmeans that it is unclear what the value means, it can be false, non existant in the interface and unsupported or anything elseOTHERmeans on the other hand that the reading was correct and that there is a clear unterstanding of what the value is but it is just not one of the values described in theENUM. In this case e.g. an application could be missing a color and using other to represent the value and add the value for the next version of OSI.globberwops commentedon Feb 13, 2023
Hi Carlo,
Thank you for the clarification.
Just to be clear, I am not calling for blindly following every rule in the Style Guide.
This specific exception is well documented, which is totally fine in my opinion.
globberwops commentedon Feb 13, 2023
Again, thank you for the clarification.
The reason for the rule is stated as
This is basically what
UNKNOWNis for in OSI, right?I'll update the example
.protolint.ymlabove to reflect that exception.