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

x/tools/go/packages: TestLoadImportsGraph failure with custom GOCACHE #29445

Closed
mvdan opened this Issue Dec 28, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@mvdan
Copy link
Member

mvdan commented Dec 28, 2018

$ git describe --always
d00ac6d2
$ go version
go version devel +6a64efc250 Thu Dec 27 00:07:53 2018 +0000 linux/amd64
$ GOCACHE= go test
PASS
ok      golang.org/x/tools/go/packages  3.788s
$ GOCACHE=$HOME/go/cache go test
--- FAIL: TestLoadImportsGraph (0.38s)
    --- FAIL: TestLoadImportsGraph/GOPATH (0.20s)
        packages_test.go:191: golang.org/fake/subdir/d.test.Srcs = [4302876da86a8aae0c1669924daa223cafca60ef49ccaa060ae37e778d18f218-d], want [0.go]
    --- FAIL: TestLoadImportsGraph/Modules (0.17s)
        packages_test.go:191: golang.org/fake/subdir/d.test.Srcs = [4302876da86a8aae0c1669924daa223cafca60ef49ccaa060ae37e778d18f218-d], want [0.go]
FAIL
exit status 1
FAIL    golang.org/x/tools/go/packages  4.093s

Looks like the test hard-codes that cache paths are under the default go-build directory, which isn't always the case. Will try to send a CL.

@katiehockman

This comment has been minimized.

Copy link
Contributor

katiehockman commented Jan 2, 2019

/cc @matloob

@katiehockman katiehockman added this to the Go1.13 milestone Jan 2, 2019

@mvdan

This comment has been minimized.

Copy link
Member

mvdan commented Jan 2, 2019

I sent https://go-review.googlesource.com/c/tools/+/155897, but forgot to link to the issue - will do on the next patchset. Though the trybots are failing, for some reason.

@dmitshur dmitshur changed the title go/packages: TestLoadImportsGraph failure with custom GOCACHE x/tools/go/packages: TestLoadImportsGraph failure with custom GOCACHE Jan 10, 2019

@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Jan 10, 2019

Change https://golang.org/cl/156977 mentions this issue: go/packages: make tests pass with custom GOCACHE

@bradfitz bradfitz modified the milestones: Go1.13, Go1.12 Jan 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment