]> Cypherpunks repositories - gostls13.git/commit
cmd/go: detect import cycle caused by test code
authorRuss Cox <rsc@golang.org>
Mon, 12 May 2014 20:52:55 +0000 (16:52 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 12 May 2014 20:52:55 +0000 (16:52 -0400)
commit2497c430d846d52dbfd2e8150c51e1ad59aeee3f
tree695463cf232a63c919c31722c377cb364499abd9
parent02cc45aded62e23f6bb6142174ab5b12f7d5b486
cmd/go: detect import cycle caused by test code

The runtime was detecting the cycle already,
but we can give a better error without even
building the binary.

Fixes #7789.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/96290043
src/cmd/go/pkg.go
src/cmd/go/test.bash
src/cmd/go/test.go
src/cmd/go/testdata/src/testcycle/p1/p1.go [new file with mode: 0644]
src/cmd/go/testdata/src/testcycle/p1/p1_test.go [new file with mode: 0644]
src/cmd/go/testdata/src/testcycle/p2/p2.go [new file with mode: 0644]
src/cmd/go/testdata/src/testcycle/p3/p3.go [new file with mode: 0644]
src/cmd/go/testdata/src/testcycle/p3/p3_test.go [new file with mode: 0644]