cryptix/git-remote-ipfs

cannot use c (type cid.Cid)

Grenadingue opened this issue · 8 comments

Got an error while trying to install

$ go get -u github.com/cryptix/git-remote-ipfs
# github.com/cryptix/git-remote-ipfs/internal/path
/home/username/go/src/github.com/cryptix/git-remote-ipfs/internal/path/path.go:92:16: cannot use c (type cid.Cid) as type *cid.Cid in argument to FromCid

With

$ go version
go version go1.11 linux/amd64
$ uname -orm
4.14.72-1-lts x86_64 GNU/Linux

Sorry, I haven’t worked or used this for quite some time. It looks like one of the dependencies changed their API.

You might have more luck using the branch from PR #8.

Otherwise you need to find out what changed in github.com/ipfs/go-cid since I checked in internal/path.

That’s all I can do for you right now

No luck

$ cd /tmp

$ git clone https://github.com/cryptix/git-remote-ipfs.git
Cloning into 'git-remote-ipfs'...
remote: Enumerating objects: 757, done.
remote: Total 757 (delta 0), reused 0 (delta 0), pack-reused 757
Receiving objects: 100% (757/757), 771.33 KiB | 393.00 KiB/s, done.
Resolving deltas: 100% (275/275), done.

$ cd git-remote-ipfs/

$ git checkout fix/deps 
Branch 'fix/deps' set up to track remote branch 'fix/deps' from 'origin'.
Switched to a new branch 'fix/deps'

$ go build
fetch.go:11:2: cannot find package "github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/github.com/cryptix/exp/git" in any of:
	/usr/lib/go/src/github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/github.com/cryptix/exp/git (from $GOROOT)
	/home/username/go/src/github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/github.com/cryptix/exp/git (from $GOPATH)
main.go:44:2: cannot find package "github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/github.com/cryptix/go/logging" in any of:
	/usr/lib/go/src/github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/github.com/cryptix/go/logging (from $GOROOT)
	/home/username/go/src/github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/github.com/cryptix/go/logging (from $GOPATH)
list.go:10:2: cannot find package "github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/github.com/ipfs/go-ipfs-api" in any of:
	/usr/lib/go/src/github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/github.com/ipfs/go-ipfs-api (from $GOROOT)
	/home/username/go/src/github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/github.com/ipfs/go-ipfs-api (from $GOPATH)
fetch.go:12:2: cannot find package "github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/gopkg.in/errgo.v1" in any of:
	/usr/lib/go/src/github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/gopkg.in/errgo.v1 (from $GOROOT)
	/home/username/go/src/github.com/cryptix/git-remote-ipfs/Godeps/_workspace/src/gopkg.in/errgo.v1 (from $GOPATH)
main.go:42:2: use of internal package github.com/cryptix/git-remote-ipfs/internal/path not allowed

I don't know anything about the Go environment, and I'm too lazy to search for the error :p

Anyway, thanks for your help and your quick response!

Okay. That doesn’t pick up the vendored code somehow... if you want you can try using godeps.

I’ll try to look into it next week. Thanks for the interest!

@Grenadingue you can try the new commit on the fix/deps branch.

It uses the new go.mod definition of Go1.11 and should build fine but I didn't test it against recent ipfs version yet.

Works like a charm @cryptix 🙂

good to know!

I'll leave this open since it's not merged into master yet.

The build errors should be fixed with #12 now.