]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix hang in workspaces
authorMichael Matloob <matloob@golang.org>
Tue, 23 Nov 2021 22:36:21 +0000 (17:36 -0500)
committerMichael Matloob <matloob@golang.org>
Wed, 8 Dec 2021 17:48:45 +0000 (17:48 +0000)
commit85a8e1786a669efe525fd4555edb77a60bac2ffe
tree844935bace12ab067c5c22d756d29b57385ef3e4
parent6b609110fdfab4a496c246889f1e67fd7cba61df
cmd/go: fix hang in workspaces

golang.org/cl/365234 incorrectly had pruningForGoVersion always return
workspace pruning instead of just returning workspace pruning at the top
level, which broke the proper determination of pruning for dependency
packages. Fix that code, and also fix a hang that resulted because the
module loading code keeps loading dependencies until it reaches a pruned
module or an unpruned module it already saw, so it could get stuck in a
cycle.

Change-Id: I8911f7d83aaee5870c43ef0355abbd439f15d4f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/366775
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/modload/modfile.go
src/cmd/go/testdata/script/work_regression_hang.txt [new file with mode: 0644]