ebsarr / packet

packet, a CLI tool to manage packet.net services
Other
40 stars 14 forks source link

Vendoring, locking dependency versions? #32

Closed StefanScherer closed 6 years ago

StefanScherer commented 6 years ago

I just tried to build packet cli with a go get command, but currently I get

# github.com/ebsarr/packet/cmd
root/go/src/github.com/ebsarr/packet/cmd/api.go:129:34: not enough arguments in call to client.Devices.List
    have (string)
    want (string, *packngo.ListOptions)

Seems to be a breaking change in some dependencies.

ebsarr commented 6 years ago

Running into this type of issue a lot these days. I’ll do a quick fix for this issue and work on the long term solution ( vendoring ? ) later .

StefanScherer commented 6 years ago

Thank you.

StefanScherer commented 6 years ago

Deploying the binary to the GitHub releases would also help a lot. Either with Travis https://docs.travis-ci.com/user/deployment/releases/ or with e.g ghr (sample usage).

vielmetti commented 6 years ago

Also getting a broken build on OS X:

bash-3.2$ go get -u github.com/ebsarr/packet
# github.com/ebsarr/packet/cmd
go/src/github.com/ebsarr/packet/cmd/api.go:106:5: unknown field 'ID' in struct literal of type packngo.ProjectUpdateRequest
go/src/github.com/ebsarr/packet/cmd/api.go:107:7: cannot use name (type string) as type *string in field value
go/src/github.com/ebsarr/packet/cmd/api.go:108:18: cannot use paymentID (type string) as type *string in field value
go/src/github.com/ebsarr/packet/cmd/api.go:111:37: not enough arguments in call to client.Projects.Update
        have (*packngo.ProjectUpdateRequest)
        want (string, *packngo.ProjectUpdateRequest)
go/src/github.com/ebsarr/packet/cmd/api.go:129:34: not enough arguments in call to client.Devices.List
        have (string)
        want (string, *packngo.ListOptions)
go/src/github.com/ebsarr/packet/cmd/api.go:322:11: cannot use hostname (type string) as type *string in field value
go/src/github.com/ebsarr/packet/cmd/api.go:323:14: cannot use description (type string) as type *string in field value
go/src/github.com/ebsarr/packet/cmd/api.go:324:11: cannot use userData (type string) as type *string in field value
go/src/github.com/ebsarr/packet/cmd/api.go:325:9: cannot use locked (type bool) as type *bool in field value
go/src/github.com/ebsarr/packet/cmd/api.go:326:7: cannot use tags (type []string) as type *[]string in field value
go/src/github.com/ebsarr/packet/cmd/api.go:326:7: too many errors
StefanScherer commented 6 years ago

@vielmetti I'm using these steps to fetch the binary from the published Docker image ;-) Works for my packer builder pipeline.

dvera commented 6 years ago

Also having the same issue on go1.9.6

vielmetti commented 6 years ago

Same issue also on Ubuntu 16.04 LTS (with the system go which is go1.6.2).

ebsarr commented 6 years ago

Issue fixed. Please check.

vielmetti commented 6 years ago

go get -u github.com/ebsarr/packet working again on macOS and on Ubuntu 16.04 LTS. Thanks!

ebsarr commented 6 years ago

@vielmetti great thanks for checking. Now I'm importing packngo from a fork under github.com/ebsarr/packngo. This will avoid the official SDK inadvertently breaking the CLI after future updates.

@StefanScherer : I will start releasing binaries with the next version. Please check #31 !

Thanks all!