Skip to content

cmd/go: 'inconsistent vendoring' error when a user module is located within GOROOT/src #34657

Closed
@awnumar

Description

@awnumar

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

$ go version
go version go1.13.1 windows/amd64

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
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\ContainerAdministrator\AppData\Local\go-build
set GOENV=C:\Users\ContainerAdministrator\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
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\github.com\awnumar\memguard\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\ContainerAdministrator\AppData\Local\Temp\go-build491552814=/tmp/go-build -gno-record-gcc-switches

What did you do?

go get ./...
go build -race -v ./...

What did you expect to see?

Expected the go tool to fetch dependencies and build the project.

What did you see instead?

C:\go\src\github.com\awnumar\memguard>call go get ./... 
go: downloading golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad
go: downloading github.com/awnumar/memcall v0.0.0-20190930130926-11bbaffc6c8f
go: extracting github.com/awnumar/memcall v0.0.0-20190930130926-11bbaffc6c8f
go: extracting golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad
go: downloading golang.org/x/sys v0.0.0-20190927073244-c990c680b611
go: extracting golang.org/x/sys v0.0.0-20190927073244-c990c680b611
go: finding github.com/awnumar/memcall v0.0.0-20190930130926-11bbaffc6c8f
go: finding golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad
go: finding golang.org/x/sys v0.0.0-20190927073244-c990c680b611

C:\go\src\github.com\awnumar\memguard>call go build -race -v ./... 
go: inconsistent vendoring in C:\go\src\github.com\awnumar\memguard:
	go.mod requires github.com/awnumar/memguard  but vendor/modules.txt does not include it.
	run 'go mod tidy; go mod vendor' to sync

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions