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

Compile does't search local vendor packages if the project is not put under GOPATH. #18166

Closed
zigo101 opened this issue Dec 2, 2016 · 2 comments

Comments

@zigo101
Copy link

zigo101 commented Dec 2, 2016

What version of Go are you using (go version)?

go version go1.7.3 linux/amd64

What did you do?

I have a go project, which has a local vendor folder containing one local lib package.
The main package imports the lib package.
The main package doesn't import any other packages.

When the project is put under $GOPATH, it compiles ok,
But if the project is put outside of $GOPATH, then compiler reports the local lib package is not found.

What did you expect to see?

I hope the project also compiles ok if it is put outside of $GOPATH.

@bradfitz
Copy link
Contributor

bradfitz commented Dec 2, 2016

Sorry, it has to be under the GOPATH.

For questions about Go, see https://golang.org/wiki/Questions.

@bradfitz bradfitz closed this as completed Dec 2, 2016
@bradfitz
Copy link
Contributor

bradfitz commented Dec 2, 2016

Also, this is a dup of #14566.

There is proposal #17271 to make GOPATH more optional.

But currently GOPATH is required to do any halfway complicated builds.

@golang golang locked and limited conversation to collaborators Dec 2, 2017
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

3 participants