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/vet: stderr spam during testing #23146

Closed
bradfitz opened this issue Dec 15, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@bradfitz
Copy link
Member

commented Dec 15, 2017

I'm seeing stderr spam on Windows running tests at master (at 9d5f8ea):

screen shot 2017-12-14 at 8 22 39 pm

This is in my Windows XP VM, if that matters.

/cc @rsc @ianlancetaylor

@rajender

This comment has been minimized.

Copy link
Contributor

commented Dec 17, 2017

I can't reproduce it in windows 10.

C:\Users\rajender\go-contrib\go\src>go test -short -run="Cancel|Race" -count=100 os/exec
ok os/exec 7.981s

C:\Users\rajender\go-contrib\go\src>go version
go version devel +9d5f8eaa8a Fri Dec 15 02:48:35 2017 +0000 windows/amd64

C:\Users\rajender\go-contrib\go\src>go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\rajender\AppData\Local\go-build set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows
set GOPATH=C:\Users\rajender\go
set GORACE=
set GOROOT=C:\Users\rajender\go-contrib\go
set GOTMPDIR=
set GOTOOLDIR=C:\Users\rajender\go-contrib\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
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 -fmessage-length=0 -fdebug-prefix-map=C:\Users\rajender\AppData\Local\Temp\go-build924340210=/tmp/go-build -gno-record-gcc-switches

C:\Users\rajender\go-contrib\go\src>

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jan 3, 2018

I believe this error means that cmd/go has found some packages in the cache. It has told vet that those packages can be found in the cache. When vet goes to open them, it gets an error.

Looking at the file name, it's weird that it's a relative path. The relevant code is in cmd/go/internal/cache/default.go. On Windows, if GOCACHE is not set in the environment, it uses a subdirectory go-build of whatever is returned by os.Getenv("LocalAppData"). I imagine that in the failing case that environment variable was not set.

@gopherbot

This comment has been minimized.

Copy link

commented Jan 3, 2018

Change https://golang.org/cl/85996 mentions this issue: cmd/go: on Windows, disable cache if LocalAppData is not set

@gopherbot gopherbot closed this in ce94c0a Jan 3, 2018

@golang golang locked and limited conversation to collaborators Jan 3, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.