Skip to content

GOPATH project compile failed because of GOROOT's vendor #34200

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

Closed
lunny opened this issue Sep 10, 2019 · 2 comments
Closed

GOPATH project compile failed because of GOROOT's vendor #34200

lunny opened this issue Sep 10, 2019 · 2 comments

Comments

@lunny
Copy link

lunny commented Sep 10, 2019

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

go1.13

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"

What did you do?

set the project as a gopath root and then

GOPATH=pwd go build

What did you expect to see?

Compile succeed

What did you see instead?

We have used a package on golang.org/x/text and vendor it on our projects. We set our project as a GOPATH. Then when we compile it, it will fail and return the error.

I think this is caused by goroot/src/vendor which added on go1.13. We can find golang.org/x/ packages on that. When compiling, go will find that vendor at first but not the vendor on gopath.

12:2: use of vendored package not allowed
@bronze1man
Copy link
Contributor

Looks like #34068

@lunny
Copy link
Author

lunny commented Sep 10, 2019

@bronze1man Thanks! duplicated with #34068.

@lunny lunny closed this as completed Sep 10, 2019
@golang golang locked and limited conversation to collaborators Sep 9, 2020
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