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

cmd/go: inconsistent vendoring in c:\Go\src #37864

Open
bathildis opened this issue Mar 15, 2020 · 1 comment
Open

cmd/go: inconsistent vendoring in c:\Go\src #37864

bathildis opened this issue Mar 15, 2020 · 1 comment
Milestone

Comments

@bathildis
Copy link

@bathildis bathildis commented Mar 15, 2020

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

$ go version
go version go1.14 windows/amd64

Does this issue reproduce with the latest release?

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

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\bathi\AppData\Local\go-build
set GOENV=C:\Users\bathi\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Go\src\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\bathi\AppData\Local\Temp\go-build653975358=/tmp/go-build -gno-record-gcc-switches    

What did you do?

$ go get github.com/PuerkitoBio/goquery

What did you expect to see?

It was the first time I downloaded external code and I just wrote code like this and run and it failed.

package main
import (
	"fmt"
)
func main() {
	fmt.Println("test")
}

I tried to go mod vendor and go mod tidy but it didn't work

What did you see instead?

go: inconsistent vendoring in c:\Go\src:
	github.com/PuerkitoBio/goquery@v1.5.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	golang.org/x/net@v0.0.0-20200202094626-16171245cfb2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	golang.org/x/net@v0.0.0-20191126235420-ef20fe5d7933: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod

run 'go mod vendor' to sync, or use -mod=mod or -mod=readonly to ignore the vendor directory
exit status 1
Process exiting with code: 1
@rajender

This comment has been minimized.

Copy link
Contributor

@rajender rajender commented Mar 15, 2020

It looks like your GOROOT & GOPATH pointing to same directory. Can you change GOPATH to different dirrctory and try?

@cagedmantis cagedmantis added this to the Backlog milestone Mar 16, 2020
@cagedmantis cagedmantis changed the title inconsistent vendoring in c:\Go\src cmd/go: inconsistent vendoring in c:\Go\src Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.