Skip to content
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

[question] how to deal with gx hash conflicts? #40

Open
adam-hanna opened this issue Jul 5, 2018 · 1 comment
Open

[question] how to deal with gx hash conflicts? #40

adam-hanna opened this issue Jul 5, 2018 · 1 comment
Assignees

Comments

@adam-hanna
Copy link

adam-hanna commented Jul 5, 2018

I have a problem where one of my gx dependencies relies on an older gx dependency.

Here's the code in question:

package foo

import (
    cid "gx/ipfs/QmapdYm1b22Frv3k17fqrBYTFRxwiaVJkB299Mfn33edeB/go-cid"
    bserv "gx/ipfs/QmcKwjeebv5SX3VFUGDFa4BNMYhy14RRaCzQP7JN3UQDpB/go-ipfs/blockservice"
    ...
)

func Bar(bs bserv.BlockService, c *cid.Cid) (*Bar, error) {
    data, err := bs.GetBlock(ctx, c)
    ...
}

I'm getting the following error on the line data, err := bs.GetBlock(ctx, c):

cannot use c (type *"gx/ipfs/QmapdYm1b22Frv3k17fqrBYTFRxwiaVJkB299Mfn33edeB/go-cid".Cid) as type *"gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid".Cid in argument to bs.GetBlock

My go-cid hash is at the latest, and so is my go-ipfs hash. However, I can see that release v0.4.15 of go-ipfs is using a different hash of go-cid (QmcZfnkap...). The same hash as the one given in the err.

What's the recommended gx-go way of dealing with this problem? Thanks!

@schomatis
Copy link
Collaborator

@adam-hanna Sorry for the delay we're currently working on it in #46, in the meanwhile there's no standard fix, we normally temporarily changed the dependency of the linked package being developed to match the dependency in go-ipfs and then revert that change when committing (although that's far from an optimal solution).

@schomatis schomatis self-assigned this Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants