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

GO15VENDOREXPERIMENT does not work outside GOPATH #12511

Closed
FiloSottile opened this issue Sep 5, 2015 · 4 comments
Closed

GO15VENDOREXPERIMENT does not work outside GOPATH #12511

FiloSottile opened this issue Sep 5, 2015 · 4 comments

Comments

@FiloSottile
Copy link
Contributor

The exact same package, which imports code from its ./vendor/ folder, will correctly go build if placed in $GOPATH/*, but will fail to find the packages in ./vendor/ if placed anywhere else.

The two different behaviors are surprising.

This was turned off in b6ead9f

@rsc
Copy link
Contributor

rsc commented Oct 19, 2015

It's not intended to work. Vendor is for fully-qualified imports (not relative ./ ones), and those only work inside $GOPATH.

@rsc rsc closed this as completed Oct 19, 2015
@FiloSottile
Copy link
Contributor Author

I see. Can you point me to the rationale/discussion? Because I think it can really confuse newcomers, since they won't be able to just clone a repository and run go build anymore. (Unless obviously there's some Makefile overriding GOPATH, but that's kind of what we want to avoid?)

@bradfitz
Copy link
Contributor

Let's move discussion to a forum. See https://golang.org/wiki/Questions

@mwf
Copy link

mwf commented Apr 14, 2016

@FiloSottile FYI you can make a softlink to anywere else and "go build" will work correctly there.

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

No branches or pull requests

5 participants