1
0
mirror of https://github.com/golang/go synced 2024-11-22 00:24:41 -07:00

cmd/go: be clear that import loops are bad

There was mail on golang-nuts a few weeks ago
from someone who understood the message perfectly
and knew he had a cyclic dependency but assumed
that Go, like Python or Java, was supposed to handle it.

R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/6488069
This commit is contained in:
Russ Cox 2012-09-01 10:34:58 -04:00
parent c1c027964e
commit 508bfda6d3

View File

@ -250,7 +250,7 @@ func reusePackage(p *Package, stk *importStack) *Package {
if p.Error == nil {
p.Error = &PackageError{
ImportStack: stk.copy(),
Err: "import loop",
Err: "import cycle not allowed",
}
}
p.Incomplete = true