-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: 'inconsistent vendoring' error when a user module is located within GOROOT/src #34657
Comments
@awnumar, Did you run the command suggested by the error message? If so, did it cause |
Ah,
|
That said, I suspect https://golang.org/cl/198319 would fix this symptom: it makes the |
(That is to say: this would likely be fixed by #33848.) |
@bcmills Running the commands to generate the vendor folder did not fix the issue. Is there an ETA for this patchset? |
Can confirm moving the working directory to |
The CLs for #33848 have landed, so I believe this should be fixed in |
When go modules enabled user code is not intended be in GOROOT(/go) hence placing source code in /src. Otherwise we hit with below error: go: inconsistent vendoring in /go/src/github.com/intel/pmem-csi: go.mod requires github.com/intel/pmem-csi but vendor/modules.txt does not include it. run 'go mod tidy; go mod vendor' to sync make: *** [Makefile:70: pmem-csi-driver] Error 1 Ref: golang/go#34657 Jenkinsfile: Place the pmem-csi source out of GOPATH
When go modules enabled user code is not intended be in GOROOT(/go) hence placing source code in /src. Otherwise we hit with below error: go: inconsistent vendoring in /go/src/github.com/intel/pmem-csi: go.mod requires github.com/intel/pmem-csi but vendor/modules.txt does not include it. run 'go mod tidy; go mod vendor' to sync make: *** [Makefile:70: pmem-csi-driver] Error 1 Ref: golang/go#34657 Jenkinsfile: Place the pmem-csi source out of GOPATH
When go modules enabled user code is not intended be in GOROOT(/go) hence placing source code in /src. Otherwise we hit with below error: go: inconsistent vendoring in /go/src/github.com/intel/pmem-csi: go.mod requires github.com/intel/pmem-csi but vendor/modules.txt does not include it. run 'go mod tidy; go mod vendor' to sync make: *** [Makefile:70: pmem-csi-driver] Error 1 Ref: golang/go#34657 Jenkinsfile: Place the pmem-csi source out of GOPATH
When go modules enabled user code is not intended be in GOROOT(/go) hence placing source code in /src. Otherwise we hit with below error: go: inconsistent vendoring in /go/src/github.com/intel/pmem-csi: go.mod requires github.com/intel/pmem-csi but vendor/modules.txt does not include it. run 'go mod tidy; go mod vendor' to sync make: *** [Makefile:70: pmem-csi-driver] Error 1 Ref: golang/go#34657 Jenkinsfile: Place the pmem-csi source out of GOPATH
When go modules enabled user code is not intended be in GOROOT(/go) hence placing source code in /src. Otherwise we hit with below error: go: inconsistent vendoring in /go/src/github.com/intel/pmem-csi: go.mod requires github.com/intel/pmem-csi but vendor/modules.txt does not include it. run 'go mod tidy; go mod vendor' to sync make: *** [Makefile:70: pmem-csi-driver] Error 1 Ref: golang/go#34657 Jenkinsfile: Place the pmem-csi source out of GOPATH
When go modules enabled user code is not intended be in GOROOT(/go) hence placing source code in /src. Otherwise we hit with below error: go: inconsistent vendoring in /go/src/github.com/intel/pmem-csi: go.mod requires github.com/intel/pmem-csi but vendor/modules.txt does not include it. run 'go mod tidy; go mod vendor' to sync make: *** [Makefile:70: pmem-csi-driver] Error 1 Ref: golang/go#34657 Jenkinsfile: Place the pmem-csi source out of GOPATH
When go modules enabled user code is not intended be in GOROOT(/go) hence placing source code in /src. Otherwise we hit with below error: go: inconsistent vendoring in /go/src/github.com/intel/pmem-csi: go.mod requires github.com/intel/pmem-csi but vendor/modules.txt does not include it. run 'go mod tidy; go mod vendor' to sync make: *** [Makefile:70: pmem-csi-driver] Error 1 Ref: golang/go#34657 Jenkinsfile: Place the pmem-csi source out of GOPATH
AppVeyor sets the latest go stack in C:\go and that is GOROOT. Cloning this repo under C:\go\src\.. directory confused go build (as discussed in golang/go#34657). The fix in go is not yet released. Thus this commit changes GOPATH to c:\gopath and clones the repo under the directory. Also, this commit removes the go get commands intended to pull in dependencies. In modules mode, `go build` pulls in the required dependencies.
* Add go.mod/go.sum * travis: update to test in modules mode and with go1.13 Remove go1.11 setup * fix appveyor config AppVeyor sets the latest go stack in C:\go and that is GOROOT. Cloning this repo under C:\go\src\.. directory confused go build (as discussed in golang/go#34657). The fix in go is not yet released. Thus this commit changes GOPATH to c:\gopath and clones the repo under the directory. Also, this commit removes the go get commands intended to pull in dependencies. In modules mode, `go build` pulls in the required dependencies.
Yes, this tip has solved my problem!! Thanks! |
In windows there are two go folders generated. |
* Add go.mod/go.sum * travis: update to test in modules mode and with go1.13 Remove go1.11 setup * fix appveyor config AppVeyor sets the latest go stack in C:\go and that is GOROOT. Cloning this repo under C:\go\src\.. directory confused go build (as discussed in golang/go#34657). The fix in go is not yet released. Thus this commit changes GOPATH to c:\gopath and clones the repo under the directory. Also, this commit removes the go get commands intended to pull in dependencies. In modules mode, `go build` pulls in the required dependencies.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Expected the go tool to fetch dependencies and build the project.
What did you see instead?
This is surprising since the exact same build works on linux, freebsd and osx, and since the project uses modules and has no vendor folder or modules.txt file.
The issue started with the recent go1.13 release and is reproducible on at least two of the packages that I maintain.
A log of the failing build is available here: https://cirrus-ci.com/task/6291981996654592
The text was updated successfully, but these errors were encountered: