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
As far as I understand the proto3 specification does not require the serialized data to be stable or deterministic (docs, notes). I'm wondering if prost would be willing to guarantee the following properties do not change, within a semver compatible version, and if they do change to note it in the changelog:
Order in which fields are encoded (e.g. encode them in order of tag number)
Order in which entries of a map are encoded, if using the BTreeMap option
Order in which repeated entries are encoded (e.g. order in which they exist in a Vec)
Encoded format of variable length integers
Fields will be encoded a deterministic amount of times (i.e. once) in a message
Encoding of packed repeated fields
I totally realize other libraries and other languages may not serialize to the exact same wire format at prost, and that's fine! The goal here is to make sure for a given proto message A, prost always serializes it to the same wire format. As far as I can tell prost already does this, but having the library formally guarantee this, within a semver compatible version, would be useful!
The text was updated successfully, but these errors were encountered:
I think this would be an interesting idea, but before we claim this we should write a test suite that verifies this and keeps track of this. If you're willing to contribute this I see no reason why not.
As far as I understand the proto3 specification does not require the serialized data to be stable or deterministic (docs, notes). I'm wondering if
prost
would be willing to guarantee the following properties do not change, within a semver compatible version, and if they do change to note it in the changelog:BTreeMap
optionVec
)I totally realize other libraries and other languages may not serialize to the exact same wire format at
prost
, and that's fine! The goal here is to make sure for a given proto messageA
,prost
always serializes it to the same wire format. As far as I can tellprost
already does this, but having the library formally guarantee this, within a semver compatible version, would be useful!The text was updated successfully, but these errors were encountered: