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

Add a script to checkout other dependencies. #1

Closed
wants to merge 1 commit into from

Conversation

alextoombs
Copy link

Saw this via the Sourcegraph meetup, went to play around. Thought it might be easier if there was a script to check out other dependencies.

@jbenet
Copy link
Member

jbenet commented Jul 13, 2014

Hello! Great, thanks! Made a comment re go get ./.... will merge this in the morning.

@alextoombs
Copy link
Author

No problem-- go get ./... fails at the moment due to some compile errors, so I figured this would be nicer for working for now. Should work fine after those errors are fixed though.

@jbenet
Copy link
Member

jbenet commented Jul 22, 2014

@alextoombs can you be more precise? go get ./... seems to work for me. (note latest changes)

@blixt
Copy link

blixt commented Jul 22, 2014

I'm unable to compile the source code as-is:

$ go get ./...
# go-ipfs/bitswap
bitswap/bitswap.go:14: invalid map key type peer.ID
bitswap/bitswap.go:15: undefined: multihash
bitswap/bitswap.go:15: undefined: block
bitswap/bitswap.go:16: undefined: multihash
# go-ipfs/netmux
netmux/netmux.go:27: syntax error: unexpected {
netmux/netmux.go:35: non-declaration statement outside function body
netmux/netmux.go:38: syntax error: unexpected ], expecting :
netmux/netmux.go:47: non-name n.Incoming on left side of :=
netmux/netmux.go:47: non-name n.incomingSrc on left side of :=
netmux/netmux.go:48: non-name n.Outgoing on left side of :=
netmux/netmux.go:48: non-name n.outgoingSrc on left side of :=
$ go version
go version go1.3 darwin/amd64

Which I guess makes sense, since looking at for example netmux/netmux.go, it's missing struct after the type name Packet:

// Warning: will probably change to adopt multiaddr format
type Packet {
  // the network addresses to send to
  // e.g. tcp4://127.0.0.1:12345
  NetAddrTo string

  // the network addresses to recv from
  // e.g. tcp4://127.0.0.1:12345
  // may be left blank to select one automatically.
  NetAddrFrom string

  // the data to send.
  Data []byte
}

@alextoombs
Copy link
Author

Yes, sorry, been distracted.

List of compilation errors looks similar.

$ go get ./...
# github.com/jbenet/go-ipfs/netmux
netmux/netmux.go:27: syntax error: unexpected {
netmux/netmux.go:35: non-declaration statement outside function body
netmux/netmux.go:38: syntax error: unexpected ], expecting :
netmux/netmux.go:47: non-name n.Incoming on left side of :=
netmux/netmux.go:47: non-name n.incomingSrc on left side of :=
netmux/netmux.go:48: non-name n.Outgoing on left side of :=
netmux/netmux.go:48: non-name n.outgoingSrc on left side of :=
# github.com/jbenet/go-ipfs/bitswap
bitswap/bitswap.go:14: invalid map key type peer.ID
bitswap/bitswap.go:15: undefined: multihash
bitswap/bitswap.go:15: undefined: block
bitswap/bitswap.go:16: undefined: multihash

$ go version
go version go1.3 darwin/amd64

1.2 -> 1.3 didn't introduce any build errors though, just stuff like random map traversals.

@jbenet
Copy link
Member

jbenet commented Jul 22, 2014

@blixt @alextoombs Yeah those modules aren't built yet, but also aren't required. can you try:

git pull
cd cmd/ipfs
go build
go install

@jpcaruana
Copy link

HI, I can't build it too :

$ go build
add.go:6:2: cannot find package "github.com/jbenet/commander" in any of:
        /opt/go/src/pkg/github.com/jbenet/commander (from $GOROOT)
        /home/jp/src/gopath/src/github.com/jbenet/commander (from $GOPATH)
ipfs.go:7:2: cannot find package "github.com/jbenet/go-ipfs/config" in any of:
        /opt/go/src/pkg/github.com/jbenet/go-ipfs/config (from $GOROOT)
        /home/jp/src/gopath/src/github.com/jbenet/go-ipfs/config (from $GOPATH)
add.go:7:2: cannot find package "github.com/jbenet/go-ipfs/core" in any of:
        /opt/go/src/pkg/github.com/jbenet/go-ipfs/core (from $GOROOT)
        /home/jp/src/gopath/src/github.com/jbenet/go-ipfs/core (from $GOPATH)
mount.go:7:2: cannot find package "github.com/jbenet/go-ipfs/fuse/readonly" in any of:
        /opt/go/src/pkg/github.com/jbenet/go-ipfs/fuse/readonly (from $GOROOT)
        /home/jp/src/gopath/src/github.com/jbenet/go-ipfs/fuse/readonly (from $GOPATH)
add.go:8:2: cannot find package "github.com/jbenet/go-ipfs/importer" in any of:
        /opt/go/src/pkg/github.com/jbenet/go-ipfs/importer (from $GOROOT)
        /home/jp/src/gopath/src/github.com/jbenet/go-ipfs/importer (from $GOPATH)
add.go:9:2: cannot find package "github.com/jbenet/go-ipfs/merkledag" in any of:
        /opt/go/src/pkg/github.com/jbenet/go-ipfs/merkledag (from $GOROOT)
        /home/jp/src/gopath/src/github.com/jbenet/go-ipfs/merkledag (from $GOPATH)
add.go:10:2: cannot find package "github.com/jbenet/go-ipfs/util" in any of:
        /opt/go/src/pkg/github.com/jbenet/go-ipfs/util (from $GOROOT)
        /home/jp/src/gopath/src/github.com/jbenet/go-ipfs/util (from $GOPATH)
add.go:11:2: cannot find package "github.com/jbenet/go-multihash" in any of:
        /opt/go/src/pkg/github.com/jbenet/go-multihash (from $GOROOT)
        /home/jp/src/gopath/src/github.com/jbenet/go-multihash (from $GOPATH)

$ go version
go version go1.3 linux/amd64

@jbenet jbenet closed this in 7d6a583 Jul 24, 2014
jbenet added a commit that referenced this pull request Jul 24, 2014
Fix #1 build errors + gofmt
whyrusleeping pushed a commit that referenced this pull request Sep 12, 2014
whyrusleeping pushed a commit that referenced this pull request Sep 18, 2014
@ghost ghost mentioned this pull request Jul 27, 2017
xlab referenced this pull request in AtlantPlatform/go-ipfs Apr 22, 2018
New surgical-extraction tool + initial source extract
ribasushi pushed a commit that referenced this pull request Jul 4, 2021
better implementation of mirrorwriter
jbouwman added a commit to jbouwman/go-ipfs that referenced this pull request Aug 30, 2021
The code example for using IPFS as a library doesn't run unless indirect dependencies are updated:

```
$ go version
go version go1.17 linux/amd64
$ uname -a
Linux home 4.19.0-17-amd64 ipfs#1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux
$ go run main.go
go: github.com/ipfs/go-ipfs@v0.9.1 requires
	github.com/ipfs/go-bitswap@v0.4.0: missing go.sum entry; to add it:
	go mod download github.com/ipfs/go-bitswap
go: github.com/ipfs/go-ipfs@v0.9.1 requires
	github.com/ipfs/go-bitswap@v0.4.0: missing go.sum entry; to add it:
	go mod download github.com/ipfs/go-bitswap
```

Remedied by:

```
$ go mod tidy
$ go run main.go
-- Getting an IPFS node running --
Spawning node on a temporary repo
    ...
```

Also, require go version 1.16, otherwise, example can fail under go
1.15 with errors like:

```
go build github.com/lucas-clemente/quic-go/internal/qtls:
    build constraints exclude all Go files in
    /home/jbouwman/go/pkg/mod/github.com/lucas-clemente/quic-go@v0.23.0/internal/qtls
```
aschmahmann pushed a commit that referenced this pull request Sep 27, 2021
The code example for using IPFS as a library doesn't run unless indirect dependencies are updated:

```
$ go version
go version go1.17 linux/amd64
$ uname -a
Linux home 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux
$ go run main.go
go: github.com/ipfs/go-ipfs@v0.9.1 requires
	github.com/ipfs/go-bitswap@v0.4.0: missing go.sum entry; to add it:
	go mod download github.com/ipfs/go-bitswap
go: github.com/ipfs/go-ipfs@v0.9.1 requires
	github.com/ipfs/go-bitswap@v0.4.0: missing go.sum entry; to add it:
	go mod download github.com/ipfs/go-bitswap
```

Remedied by:

```
$ go mod tidy
$ go run main.go
-- Getting an IPFS node running --
Spawning node on a temporary repo
    ...
```

Also, require go version 1.16, otherwise, example can fail under go
1.15 with errors like:

```
go build github.com/lucas-clemente/quic-go/internal/qtls:
    build constraints exclude all Go files in
    /home/jbouwman/go/pkg/mod/github.com/lucas-clemente/quic-go@v0.23.0/internal/qtls
```

(cherry picked from commit cb189c7)
aschmahmann pushed a commit that referenced this pull request Sep 27, 2021
The code example for using IPFS as a library doesn't run unless indirect dependencies are updated:

```
$ go version
go version go1.17 linux/amd64
$ uname -a
Linux home 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux
$ go run main.go
go: github.com/ipfs/go-ipfs@v0.9.1 requires
	github.com/ipfs/go-bitswap@v0.4.0: missing go.sum entry; to add it:
	go mod download github.com/ipfs/go-bitswap
go: github.com/ipfs/go-ipfs@v0.9.1 requires
	github.com/ipfs/go-bitswap@v0.4.0: missing go.sum entry; to add it:
	go mod download github.com/ipfs/go-bitswap
```

Remedied by:

```
$ go mod tidy
$ go run main.go
-- Getting an IPFS node running --
Spawning node on a temporary repo
    ...
```

Also, require go version 1.16, otherwise, example can fail under go
1.15 with errors like:

```
go build github.com/lucas-clemente/quic-go/internal/qtls:
    build constraints exclude all Go files in
    /home/jbouwman/go/pkg/mod/github.com/lucas-clemente/quic-go@v0.23.0/internal/qtls
```

(cherry picked from commit cb189c7)
aschmahmann pushed a commit that referenced this pull request Sep 27, 2021
The code example for using IPFS as a library doesn't run unless indirect dependencies are updated:

```
$ go version
go version go1.17 linux/amd64
$ uname -a
Linux home 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux
$ go run main.go
go: github.com/ipfs/go-ipfs@v0.9.1 requires
	github.com/ipfs/go-bitswap@v0.4.0: missing go.sum entry; to add it:
	go mod download github.com/ipfs/go-bitswap
go: github.com/ipfs/go-ipfs@v0.9.1 requires
	github.com/ipfs/go-bitswap@v0.4.0: missing go.sum entry; to add it:
	go mod download github.com/ipfs/go-bitswap
```

Remedied by:

```
$ go mod tidy
$ go run main.go
-- Getting an IPFS node running --
Spawning node on a temporary repo
    ...
```

Also, require go version 1.16, otherwise, example can fail under go
1.15 with errors like:

```
go build github.com/lucas-clemente/quic-go/internal/qtls:
    build constraints exclude all Go files in
    /home/jbouwman/go/pkg/mod/github.com/lucas-clemente/quic-go@v0.23.0/internal/qtls
```

(cherry picked from commit cb189c7)
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this pull request Oct 23, 2021
Move DHT off `ipfs/go-ipfs`
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this pull request Apr 7, 2022
Pull In Upstream Changes
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

Successfully merging this pull request may close these issues.

4 participants