TheThingsArchive / go-app-sdk

The Things Network V2 Application SDK for Go
https://www.thethingsnetwork.org
MIT License
18 stars 6 forks source link

Installation errors #8

Closed philmcp closed 6 years ago

philmcp commented 6 years ago

When running go get github.com/TheThingsNetwork/go-app-sdk I am getting the following error:

../../github.com/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:57:26: cannot use cmd.MACCommand() (type lorawan.MACCommand) as type lorawan.Payload in append:

Any ideas?

johanstokking commented 6 years ago

Smells like a vendor issue.

htdvisser commented 6 years ago

I updated the vendor files and README, so that you can now use dep or vgo to get the right versions of all dependencies. @philmcp could you check if this works for you?

philmcp commented 6 years ago

Thanks but not quite sure I understand the dep part @htdvisser. I installed dep (brew install dep) and ran go get -u github.com/golang/dep/cmd/dep then cd my-project-path then dep ensure. When I go build I get the same error cannot use cmd.MACCommand(). I then tried go get github.com/TheThingsNetwork/go-app-sdk but still having the same issue. Maybe Ive misunderstood dep?...

Someone else told me to run go get -u -d -v github.com/TheThingsNetwork/go-app-sdk which seemed to work (getting other errors, but not related to the go get part I dont think)

johanstokking commented 6 years ago

You should be running dep ensure in the $GOPATH/src/github.com/TheThingsNetwork/go-app-sdk folder, see the instructions.

htdvisser commented 6 years ago

That's indeed strange. With the vgo method it seems to work every time, but with dep I also get errors on some environments. Could you let me know if the vgo method works for you?

I removed the instructions for dep until we can reliably fix the build with dep.

philmcp commented 6 years ago

Thanks @htdvisser using vgo builds