]> Cypherpunks repositories - gostls13.git/commit
cmd/go: make 'go list -test' report the correct import path
authorSuzy Mueller <suzmue@golang.org>
Thu, 9 Aug 2018 17:05:54 +0000 (13:05 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 10 Aug 2018 00:26:47 +0000 (00:26 +0000)
commitd611e95cabbd531418beb7c1fdc7191ba3151c2a
tree572314cb6ed29f5cffb148e5d04177666fb56508
parent9f4ea6c25d7cee2ddb7d478cf03582baad17cc59
cmd/go: make 'go list -test' report the correct import path

When a test variant of a package is created, the two versions cannot
share memory for the fields that contain information about their
imports, as these will be different between the two packagse.

Both the Internal.Imports and the Imports fields must be able to be
updated in the test variant without affecting the values of the
original.

Fixes golang/go#26880

Change-Id: Id61fad7d976e179c6c7711a394ce43ec8302fd7a
Reviewed-on: https://go-review.googlesource.com/128836
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/internal/load/test.go
src/cmd/go/testdata/script/list_test_imports.txt [new file with mode: 0644]