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: "go test" command leaves go-build directory in current directory on Windows XP #23190

Closed
alexbrainman opened this issue Dec 20, 2017 · 6 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@alexbrainman
Copy link
Member

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

go version devel +9d5f8ea Fri Dec 15 02:48:35 2017 +0000 windows/386

Does this issue reproduce with the latest release?

Yes.

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

I use Windows XP

set GOARCH=386
set GOBIN=
set GOCACHE=go-build
set GOEXE=.exe
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Documents and Settings\aa\dev\
set GORACE=
set GOROOT=C:\Documents and Settings\aa\dev\go
set GOTMPDIR=
set GOTOOLDIR=C:\Documents and Settings\aa\dev\go\pkg\tool\windows_386
set GCCGO=gccgo
set GO386=sse2
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=-m32 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\DOCUME~1\aa\LOCALS~1\Temp\go-build509878090=/tmp/go-build -gno-record-gcc-switches

What did you do?

I run a test like that:

C:\Documents and Settings\aa\dev\go\src\os>git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean

C:\Documents and Settings\aa\dev\go\src\os>go test -short
PASS
ok      os      1.202s

C:\Documents and Settings\aa\dev\go\src\os>git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        go-build/

nothing added to commit but untracked files present (use "git add" to track)

C:\Documents and Settings\aa\dev\go\src\os>

What did you expect to see?

I did not expect to see go-build directory.

What did you see instead?

I did see go-build directory.

Alex

@bradfitz
Copy link
Contributor

Test cleanups are fine for Go 1.10 if you want to fix this.

@bradfitz bradfitz added NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure. labels Dec 20, 2017
@bradfitz bradfitz added this to the Go1.11 milestone Dec 20, 2017
@alexbrainman
Copy link
Member Author

I am not sure this is a test clean-up. It creates go-build directory in any package directory. I suspect this has something to do with go command itself. But I didn't look properly.

@alexbrainman
Copy link
Member Author

This is not happening anymore, because CL 85996 disabled caching on Windows XP altogether. Windows XP has different environment variable from %LocalAppData% - it is called %APPDATA%. So we can enable cache on Windows XP, if we want, but I am happy to leave it as is too.

I will let Ian or Brad decide what to do here.

Thank you.

Alex

@bradfitz
Copy link
Contributor

Disabling build caching on XP was an accident and should probably be fixed.

@bradfitz
Copy link
Contributor

@gopherbot
Copy link

Change https://golang.org/cl/87675 mentions this issue: cmd/go: use Windows %AppData% for build cache if %LocalAppData% is empty

@golang golang locked and limited conversation to collaborators Jan 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

3 participants