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
The text was updated successfully, but these errors were encountered:
dsnet
changed the title
Equal prints to stderr and fails on what's handled by Marshal/Unmarshal
proto: Equal prints to stderr and fails on what's handled by Marshal/Unmarshal
Feb 14, 2018
In the presence of unknown fields (for which unregistered extensions are special-case of), Equal always returns false. It could be argued that it should fall back on direct string comparison on the raw text. However, comparing raw bytes has very few guarantees:
Identical raw bytes does not imply equality due to the possible presence of NaNs.
Non-identical raw bytes does not imply inequality as fields may be re-ordered in the bytes wire type, but the lack of proto type information makes it impossible to know.
The current position isn't great (only false negatives), but I'm not sure it's worse than the alternative where the equality can have false-negatives and false-positives.
Two problems with the following program:
Data must be Equal after Marshal/Unmarshal.
On commit 2402d76.
The text was updated successfully, but these errors were encountered: