yannh / redis-dump-go

Backup & Restore your Redis server - FAST
MIT License
280 stars 58 forks source link

Dependencies upgrade required #5

Closed kmmndr closed 4 years ago

kmmndr commented 4 years ago

While trying to build the project, I encountered errors with golang.org/x/xerrors package

$ export GOPATH=$(mktemp -d)
$ go get github.com/yannh/redis-dump-go
# github.com/yannh/redis-dump-go/vendor/golang.org/x/xerrors
/tmp/tmp.H8Wn4abREk/src/github.com/yannh/redis-dump-go/vendor/golang.org/x/xerrors/adaptor_go1_13.go:16:14: undefined: errors.Frame
/tmp/tmp.H8Wn4abREk/src/github.com/yannh/redis-dump-go/vendor/golang.org/x/xerrors/format_go1_13.go:12:18: undefined: errors.Formatter

Steps to reproduce the bug

$ export GOPATH=$(mktemp -d)
$ go get github.com/yannh/redis-dump-go
...error...
$ cd ${GOPATH}/src/github.com/yannh/redis-dump-go
$ go build
go: downloading github.com/mediocregopher/radix/v3 v3.3.2
go: extracting github.com/mediocregopher/radix/v3 v3.3.2
go: downloading golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522
go: extracting golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522
go: finding github.com/mediocregopher/radix/v3 v3.3.2
go: finding golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522
# golang.org/x/xerrors
../../../../pkg/mod/golang.org/x/xerrors@v0.0.0-20190513163551-3ee3066db522/adaptor_go1_13.go:16:14: undefined: errors.Frame
../../../../pkg/mod/golang.org/x/xerrors@v0.0.0-20190513163551-3ee3066db522/format_go1_13.go:12:18: undefined: errors.Formatter

Fix

$ cd ${GOPATH}/src/github.com/yannh/redis-dump-go
$ go get -u ./...
go: finding github.com/mediocregopher/radix/v3 v3.4.1
go: finding golang.org/x/xerrors latest
go: downloading github.com/mediocregopher/radix/v3 v3.4.1
go: extracting github.com/mediocregopher/radix/v3 v3.4.1
go: downloading golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898
go: extracting golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898
$ go build
$ go install
yannh commented 4 years ago

@kmmndr I upgraded the deps, but note that the dependencies are vendored: newer versions of Go should automatically detect that and use the deps from vendor/ rather than downloading them. I upgraded the Go used to build.

yannh commented 4 years ago

Note: I fixed the makefile to make sure it uses the vendored dependencies.