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

go mod tidy ipfs library example #8397

Merged
merged 1 commit into from
Sep 2, 2021

Conversation

jbouwman
Copy link
Contributor

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

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
```
@Stebalien Stebalien merged commit 9506a57 into ipfs:master Sep 2, 2021
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.

2 participants