mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay JN Guo" <guojian...@cn.ibm.com>
Subject [Protobuf] Why do we mark field as 'required'
Date Thu, 23 Jun 2016 00:15:20 GMT


Hi,

I find marking protobuf field as 'required' sometimes causing trouble:
serializing a message without filling up required field generates errors
and this is hard to change due to backwards compatibility. And this message
type is actually discouraged by protobuf:
https://developers.google.com/protocol-buffers/docs/proto#specifying-field-rules

So is there a particular reason we are doing it? I would suggest to use
optional and repeated onwards if possible and add more verification logic
instead.

/Jay

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message