Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3: Installation issues #2106

Closed
wayneashleyberry opened this issue May 18, 2019 · 4 comments · Fixed by #2114
Closed

v3: Installation issues #2106

wayneashleyberry opened this issue May 18, 2019 · 4 comments · Fixed by #2114

Comments

@wayneashleyberry
Copy link
Contributor

wayneashleyberry commented May 18, 2019

Hi 👋 I'm trying to follow the installation instructions in the readme and have been running into some issues. First, my setup:

bash-5.0$ go version
go version go1.12.5 darwin/amd64
export GO111MODULE=on

There is no goa available in my $PATH and $PATH does include $HOME/go/bin

bash-5.0$ which goa
bash-5.0$ echo $?
1

I try the go get commands:

bash-5.0$ go get -u goa.design/goa/v3
go: finding github.com/manveru/faker latest
go: finding github.com/manveru/gobdd latest
go: finding github.com/google/gxui latest
go: finding github.com/zach-klippenstein/goregen latest
go: finding github.com/dimfeld/httppath latest
go: finding golang.org/x/tools latest
go: finding golang.org/x/sync latest
go: finding golang.org/x/lint latest
go: finding golang.org/x/oauth2 latest
go: finding golang.org/x/net latest
go: finding golang.org/x/sys latest
go: finding golang.org/x/crypto latest
go: finding golang.org/x/time latest
go: finding gopkg.in/check.v1 latest
go: finding google.golang.org/genproto latest
go: finding github.com/jstemmer/go-junit-report latest
go: finding honnef.co/go/tools latest
go: finding github.com/golang/glog latest
go: finding github.com/google/pprof latest
go: finding github.com/globalsign/mgo latest
go: finding golang.org/x/exp latest
go: finding github.com/mailru/easyjson latest
go: finding github.com/PuerkitoBio/urlesc latest
go: finding github.com/asaskevich/govalidator latest
go: finding golang.org/x/mobile latest
go: finding golang.org/x/image latest
go: finding github.com/BurntSushi/xgb latest
go: finding github.com/smartystreets/goconvey latest
go: finding github.com/smartystreets/assertions latest
go: finding github.com/gopherjs/gopherjs latest
bash-5.0$ echo $?
0
bash-5.0$ go get -u goa.design/goa/v3/...
go: finding goa.design/goa/v3/... latest
go get goa.design/goa/v3/...: no matching versions for query "latest"
bash-5.0$ echo $?
1

The first go get command seems to be successful, but the second is not and there is no goa binary available:

bash-5.0$ goa version
bash: goa: command not found
bash-5.0$ $HOME/go/bin/goa version
bash: /Users/wayneberry/go/bin/goa: No such file or directory
bash-5.0$ ./goa version
bash: ./goa: No such file or directory

Not sure what to do now. I realise this might be an issue with Go and not Goa, but whatever the workaround is we should at least update the readme :)

@wayneashleyberry
Copy link
Contributor Author

I found a working solution over at https://github.com/go-modules-by-example/index/blob/master/010_tools/README.md#tools-as-dependencies

I'm not sure if this is the only way to install binaries globally with modules in Go, but at least it works for now. It might be worth linking to this example in the readme unless there's a better way?

@wayneashleyberry
Copy link
Contributor Author

I dug a little deeper and seems like there are currently issues using ... with go get

see: golang/go#27215

Would it perhaps be better to change the line in the readme to fetch the command directly?

- go get -u goa.design/goa/v3/...
+ go get -u goa.design/goa/v3/cmd/goa

@raphael
Copy link
Member

raphael commented May 20, 2019

Thank you for the pointer to the "Go modules by example" repo! I think what's happening here is that the ... notation only works in the context of a module. So if you run go mod init [whatever your module is here] prior to running go get -u goa.design/goa/v3/... then things should work. But yes it would be good to clarify that in the README and also add the line you have above for installing the binary directly. Care to make a PR?

@wayneashleyberry
Copy link
Contributor Author

I can definitely open up a PR @raphael - I should have a gap later this evening 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants