-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch to the gogo protobuf package in the filestore #5269
Conversation
License: MIT Signed-off-by: Steven Allen <[email protected]>
What's the story of this, just a leftover from moving everything to gogo protobuf? |
No idea. However, we're using one version of protobuf here, the same in prometheus, and a different version in badger (needs a newer version). However, I need to update the version in prometheus to the one that we use in badger so I figured we should just kill this one off (@whyrusleeping had no idea why we were using this here either). |
Its worth noting though, that the version of gogo protobuf we are using has a serialization order bug. If we try to update gogo, it will break all of our hashes. This is no bueno |
I'd like to vendor that old version of gogo and rename it to something like gogo-for-ipfs. |
Maybe that's something to coordinate with the base32 changes. |
The base32 change will not break change hashes, Just the way there are presented. |
Is it not possible to rewrite the protobufs in a way that is preserving the 'broken' order of things? |
No. In "canonical" protobuf, fields are serialized in tag order. In the buggy gogo, fields were being serialized in the order in which they appeared in the protobuf schema. Unfortunately, we list the |
However... we can update the protobuf library as long as we don't update the generated protobuf marshaler in |
That strikes me as just asking for trouble down the road. What is to keep some other developer from regenerating this file using the update protobuf library? |
My plan is to add a constant ( Note: this is already a problem as this file is generated by a command (where the version of the command isn't enforced by gx). |
Okay that can work as long we make it clear why we can't regenerate the file so developers not familiar with the issue won't be tempted to override the check. |
Yep. It'll have a big comment. Maybe I'll even set the constant to a multi-line string describing the issue. |
We recently had a PR that was reapplying the old bug on fresh gogoprotobuf. Maybe we should use that? |
We don't actually need that. Really, we just need the one generated function in the generated go file. |
Done in a different PR. |
No description provided.