]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix module loader and test-only dependencies
authorRuss Cox <rsc@golang.org>
Tue, 7 Aug 2018 19:50:24 +0000 (15:50 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 10 Aug 2018 00:47:06 +0000 (00:47 +0000)
commita4749604dc6cfea517ce2590336596a4ae570e78
treea3e08f33970922cf43055d9af2a835bc3f0542b6
parentd611e95cabbd531418beb7c1fdc7191ba3151c2a
cmd/go: fix module loader and test-only dependencies

go list all was not behaving as documented - it did not pick up
test dependencies except when running in "go test" and "go vet".
It should pick them up always.

Also the module loader was ignoring tests when using "go list -test",
which led to load failures.

Fixing all required adjustments to mod_patterns test.
Removed error-prone exact listings.

Fixes #26279.
Fixes #26906.

Change-Id: I9c5acaf2275be20fd2349859589502190d3e7a78
Reviewed-on: https://go-review.googlesource.com/128358
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/list/list.go
src/cmd/go/internal/modload/load.go
src/cmd/go/internal/test/test.go
src/cmd/go/internal/vet/vet.go
src/cmd/go/testdata/mod/rsc.io_sampler_v1.3.0.txt
src/cmd/go/testdata/mod/rsc.io_testonly_v1.0.0.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_internal.txt
src/cmd/go/testdata/script/mod_list_bad_import.txt
src/cmd/go/testdata/script/mod_patterns.txt
src/cmd/go/testdata/script/mod_test.txt