]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1] cmd/go: be clear that import loops are bad
authorRuss Cox <rsc@golang.org>
Fri, 21 Sep 2012 19:54:56 +0000 (05:54 +1000)
committerRuss Cox <rsc@golang.org>
Fri, 21 Sep 2012 19:54:56 +0000 (05:54 +1000)
««« backport f697709b5082
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

»»»

src/cmd/go/pkg.go

index 30bbfad55a9069b2f6c4c883407614278b38b342..51046412fccc9a9834669fd2b293c4336f54ec8f 100644 (file)
@@ -246,7 +246,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