moncho/dry

Build error

Closed this issue · 2 comments

bard commented
$ go version
go version go1.11.4 linux/amd64
$ go get github.com/moncho/dry
# github.com/moncho/dry/ui
gopath/src/github.com/moncho/dry/ui/par.go:7:43: undefined: termui.Par
gopath/src/github.com/moncho/dry/ui/par.go:8:7: undefined: termui.NewPar
# github.com/moncho/dry/docker
gopath/src/github.com/moncho/dry/docker/container_config.go:44:26: cannot use portSet (type "github.com/docker/go-connections/nat".PortSet) as type "github.com/docker/docker/vendor/github.com/docker/go-connections/nat".PortSet in assignment
gopath/src/github.com/moncho/dry/docker/container_config.go:60:30: cannot use bindings (type map["github.com/docker/go-connections/nat".Port][]"github.com/docker/go-connections/nat".PortBinding) as type "github.com/docker/docker/vendor/github.com/docker/go-connections/nat".PortMap in assignment
gopath/src/github.com/moncho/dry/docker/images.go:67:94: cannot use imageDetails.ContainerConfig.ExposedPorts (type "github.com/docker/docker/vendor/github.com/docker/go-connections/nat".PortSet) as type "github.com/docker/go-connections/nat".PortSet in argument to newCCB().image(imageName).command(command).ports

Elsewhere I read that this may have to do with termui v1 no longer being available, unfortunately I'm not experienced enough with Go to debug this further.

Thanks for reporting!!

This repo now uses go modules to handle dependencies. The default behavior of go get in Go 1.11 is to ignore versions specified in the go.mod file and to get whatever is in the master branch of its dependencies, but dry is still using older versions for some of its dependencies.

Forcing go modules GO111MODULE=on go get -u github.com/moncho/dry will result in go: cannot find main module; see 'go help modules'. See this.

I can think of two alternatives to build binaries:

  • Clone the project and build it with make install.
  • Use gobin. After installing gobin, this should work: gobin github.com/moncho/dry@master.
bard commented

make install did the trick. Thanks!