1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:54:42 -07:00

go/packages: drop imports of reflect in tests of import graph

In CL 219639 the generated testing package gets a dependency on reflect.
Trim that dependency in the go/packages tests, just as we trim
other dependencies of the generated testing package.

Updates golang/go#34129

Change-Id: I5e2578fc61cafb4d524d0a58525cf78a402c1143
Reviewed-on: https://go-review.googlesource.com/c/tools/+/221477
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
Ian Lance Taylor 2020-02-27 17:20:48 -08:00
parent 5c7c66ced5
commit a628ca32eb

View File

@ -2671,7 +2671,7 @@ func importGraph(initial []*packages.Package) (string, map[string]*packages.Pack
for _, imp := range p.Imports {
if isTestMain {
switch imp.ID {
case "os", "testing", "testing/internal/testdeps":
case "os", "reflect", "testing", "testing/internal/testdeps":
edges = append(edges, fmt.Sprintf("%s -> %s (pruned)", p, imp))
continue
}