]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/load: always set IsImportCycle when in a cycle
authorRoland Shoemaker <roland@golang.org>
Fri, 12 Mar 2021 17:51:50 +0000 (09:51 -0800)
committerRoland Shoemaker <roland@golang.org>
Fri, 12 Mar 2021 19:10:07 +0000 (19:10 +0000)
commitcdd08e615a9b92742b21a94443720b6d70452510
tree35c80c035d44698c2bebecc129636ed135c3a664
parent4662029264e79f144eef4323631b3356624e884f
cmd/go/internal/load: always set IsImportCycle when in a cycle

When hitting an import cycle in reusePackage, and there is already
an error set, make sure IsImportCycle is set so that we don't
end up stuck in a loop.

Fixes #25830

Change-Id: Iba966aea4a637dfc34ee22782a477209ac48c9bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/301289
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/go/internal/load/pkg.go
src/cmd/go/testdata/script/list_err_cycle.txt [new file with mode: 0644]