-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Update gogo protobuf dependency #3214
Comments
This has escalated into a serious problem for us, because the vendored gogo-protobuf apparently generates code that can't marshall/unmarshall oneofs. Is there any workaround with gx to make it not rewrite the gogo-protobuf dependency in our tree? We don't explicitly depend on the gx vendored package, but it gets rewritten because of the transitive dependency through libp2p. |
The huge part of gogo-protobuf are tests (there is tests that has 400k lines). We could add them to |
Also it looks like we are using only |
Removing |
@vyzo you can try importing |
@Kubuxu thanks, the explicit import of this new version works with protos compiled with unvendored gogo-protobuf! |
And needless to say, it solves our marshaling woes :) |
The process became just a bit more complicated, as gogo protobuf fixed bug with order of values. Version of protobuf used by us includes the bug, current protobuf 3 version is fixed. Meaning that if we update the protobuf library hashes of new files will change. |
Was browsing around and ran across this issue. Since you are about start producing new hashes anyway ( due to the different order of protobuf "frames" ) may I suggest re-declaring repeated varint fields as packed? According to the spec packed fields are forward and backward compatible... This will save 1~2 bytes per unixfs link (and likely for other higher protocols too) |
We won't be changing output hashes just to update protobuf Also as far as I know, we won't be touching protobuf-unixfs format. We plan deprecating it, and maybe creating ipld-unixfs in version 0.5 but it isn't still decided, AFAIK. @whyrusleeping might know more about this. |
@Kubuxu I meant the above suggestion given that hashes will change as per your own writeup here: #3214 (comment) |
As we don't want to change the hashes, we can't update for this new version of gogo-protobuf. But we should update gogo-protobuf to a version with test vectors removed. It is 19MiB of 29MiB package, we probably could remove some other packages from it too. @lgierth what is the status of the gx-worktree tool? Could it be used to painlessly create series of those PRs? |
I'm currently working on this. Plan:
|
@Stebalien this seems like a suboptimal plan. What you want is to update gogo, apply the patch reverting the sorting change, and publish that in The only reason I did not reopen/finish #5012 is because I ran out of time trying to figure out how |
We should do that as well however, we want all of this to work without gx. That's why I'm taking this approach (use upstream as much as possible). |
The sharness tests pass. Running the interop tests now. |
The interop tests pass (those that usually do, at least). |
fixes #3214 License: MIT Signed-off-by: Steven Allen <[email protected]>
fixes #3214 License: MIT Signed-off-by: Steven Allen <[email protected]> This commit was moved from ipfs/interface-go-ipfs-core@1ef1634 This commit was moved from ipfs/boxo@e415aa1
fixes #3214 License: MIT Signed-off-by: Steven Allen <[email protected]> This commit was moved from ipfs/interface-go-ipfs-core@1ef1634 This commit was moved from ipfs/boxo@e415aa1
We havent updated our gogo-protobuf dep in a while. The primary reason for this is that its not as simple to do as a lot of our other deps. The repo itself is huge, and our current gogo-protobuf package is roughly 40MB. This make the
gx install
ux slow and really annoying.We should look at repackaging a newer version with exactly what we need, or finding a better way to shrink this package to just what we need to make the process of keeping things updated easier.
cc @Kubuxu @parkan @vyzo
The text was updated successfully, but these errors were encountered: