dnephin / dobi

A build automation tool for Docker applications
https://dnephin.github.io/dobi/
Apache License 2.0
309 stars 36 forks source link

Unable to compile: undefined: tar.FormatPAX #134

Closed cybe closed 6 years ago

cybe commented 6 years ago

Since a couple of days I'm unable to compile dobi:

CGO_ENABLED=0 go get -u github.com/dnephin/dobi
# github.com/docker/cli/vendor/github.com/docker/docker/pkg/archive
/go/src/github.com/docker/cli/vendor/github.com/docker/docker/pkg/archive/archive.go:364:5: hdr.Format undefined (type *tar.Header has no field or method Format)
/go/src/github.com/docker/cli/vendor/github.com/docker/docker/pkg/archive/archive.go:364:15: undefined: tar.FormatPAX
/go/src/github.com/docker/cli/vendor/github.com/docker/docker/pkg/archive/archive.go:1166:7: hdr.Format undefined (type *tar.Header has no field or method Format)
/go/src/github.com/docker/cli/vendor/github.com/docker/docker/pkg/archive/archive.go:1166:17: undefined: tar.FormatPAX

Any hints?

dnephin commented 6 years ago

I guess a dependency made a backwards incompatible change. dobi uses dep to pin dependencies. So if you dep ensure to setup vendor it should build.

cybe commented 6 years ago

That was exactly it, thank you!

theckman commented 6 years ago

Someone just ran in to a similar on the Go Slack workspace. For anyone who finds this issue in the future, the issue was that the Format field was only added in go 1.10. If you're getting hdr.Format undefined (type *tar.Header has no field or method Format) make sure you're using Go 1.10 or newer.