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

v1 import not working, getting routed to v2 #2111

Closed
jsteenb2 opened this issue May 22, 2019 · 4 comments
Closed

v1 import not working, getting routed to v2 #2111

jsteenb2 opened this issue May 22, 2019 · 4 comments

Comments

@jsteenb2
Copy link

setup: go version go1.11.10 linux/amd64

Instructions to install the goa toolchain are not working as expected.

Attempting to install v1 goagen via:

go get -u goa.design/v1/goa does not hit the v1 gopkg, but rather v2.

Not sure how to remedy this, any docs/work arounds available?

@raphael
Copy link
Member

raphael commented May 24, 2019

Goa v1 can be installed with

go get -u -v github.com/goadesign/goa/...

Note that the master branch and the v1 branch are similar but not equivalent. The master branch is deprecated so it is recommended to use a vendoring tool (e.g. dep) to pin Goa to the v1 branch.

@agnivade
Copy link

In my case, it is trying to fetch v3. This has essentially stopped out builds in CI. Let me know how to resolve this -

go get -v -u github.com/goadesign/goa/...
github.com/goadesign/goa (download)
Fetching https://goa.design/goa/v3/codegen?go-get=1
Parsing meta tags from https://goa.design/goa/v3/codegen?go-get=1 (status code 200)
get "goa.design/goa/v3/codegen": found meta tag get.metaImport{Prefix:"goa.design/goa", VCS:"git", RepoRoot:"https://gopkg.in/goadesign/goa.v2"} at https://goa.design/goa/v3/codegen?go-get=1
get "goa.design/goa/v3/codegen": verifying non-authoritative meta tag
Fetching https://goa.design/goa?go-get=1
Parsing meta tags from https://goa.design/goa?go-get=1 (status code 200)
goa.design/goa (download)
package github.com/goadesign/goa/cmd/goa
	imports goa.design/goa/v3/codegen: cannot find package "goa.design/goa/v3/codegen" in any of:
	/usr/local/go/src/goa.design/goa/v3/codegen (from $GOROOT)
	/go/src/goa.design/goa/v3/codegen (from $GOPATH)
Fetching https://goa.design/goa/v3/pkg?go-get=1
Parsing meta tags from https://goa.design/goa/v3/pkg?go-get=1 (status code 200)
get "goa.design/goa/v3/pkg": found meta tag get.metaImport{Prefix:"goa.design/goa", VCS:"git", RepoRoot:"https://gopkg.in/goadesign/goa.v2"} at https://goa.design/goa/v3/pkg?go-get=1
get "goa.design/goa/v3/pkg": verifying non-authoritative meta tag
package github.com/goadesign/goa/cmd/goa
	imports goa.design/goa/v3/pkg: cannot find package "goa.design/goa/v3/pkg" in any of:
	/usr/local/go/src/goa.design/goa/v3/pkg (from $GOROOT)
	/go/src/goa.design/goa/v3/pkg (from $GOPATH)

@agnivade
Copy link

This is because v3 is the default branch. So essentially there is no way to use GOPATH mode and keep using v1. I had to move to module mode to keep using v1. In future, I would request to proceed with caution to avoid breaking your users' codebase.

@raphael
Copy link
Member

raphael commented May 26, 2019

Yeah it's not great, on the other hand keeping the default on GitHub to the old master is also pretty bad as newcomers would be misled. I don't really see a good way out, do you? Obviously it's possible to use git to clone the repo and checkout the v1 branch - that makes it possible to use v1 without Go modules but is an extra unexpected step. I'll add these instructions to the v1 README.

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

No branches or pull requests

3 participants