gotooltest: move default GOPATH out of the main module#156
Merged
mvdan merged 1 commit intorogpeppe:masterfrom Apr 22, 2022
Merged
gotooltest: move default GOPATH out of the main module#156mvdan merged 1 commit intorogpeppe:masterfrom
mvdan merged 1 commit intorogpeppe:masterfrom
Conversation
Collaborator
Author
|
FYI @rogpeppe this is one of the bugs we ran into this morning. |
Otherwise, commands like `go mod tidy` will try to walk into the default GOPATH directory. At best, that's a waste of resources, since directories like GOMODPATH may contain lots of files. At worst, it results in errors, as directories in GOMODPATH are not valid import paths: --- FAIL: TestScripts/list (0.01s) testscript.go:413: [...] > go mod tidy [stderr] mod/gopath/pkg/mod/fruit.com@v1.1.0/fruit: import path "mod/gopath/pkg/mod/fruit.com@v1.1.0/fruit" should not have @Version We add the test in goproxytest, as goproxytest already uses gotooltest, and we need an external module to reproduce the error.
cueckoo
pushed a commit
to cue-lang/cue-trybot
that referenced
this pull request
Aug 23, 2022
See rogpeppe/go-internal#156; the leading dot was added to "hide" the directory so that it is not walked by commands such as `go list ./...`. This broke our test, as we hard-coded the previous location via `$WORK/gopath` to get to the default `GOBIN` location. We can fix the tests and make them future-proof via `$GOPATH` instead. The trybots didn't catch this on Gerrit as these are long tests. I had forgotten that the long tests are opt-in, and so the recent CL that bumped go-internal to v1.9.0 broke master. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I0203595f0352c6205deb22bff3a9a7ca2d06da07
cueckoo
pushed a commit
to cue-lang/cue
that referenced
this pull request
Aug 24, 2022
See rogpeppe/go-internal#156; the leading dot was added to "hide" the directory so that it is not walked by commands such as `go list ./...`. This broke our test, as we hard-coded the previous location via `$WORK/gopath` to get to the default `GOBIN` location. We can fix the tests and make them future-proof via `$GOPATH` instead. The trybots didn't catch this on Gerrit as these are long tests. I had forgotten that the long tests are opt-in, and so the recent CL that bumped go-internal to v1.9.0 broke master. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I0203595f0352c6205deb22bff3a9a7ca2d06da07 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/542618 Unity-Result: CUEcueckoo <cueckoo@cuelang.org> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Paul Jolly <paul@myitcv.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(see commit message)