]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: only check root-promotion during tidy for lazy modules
authorBryan C. Mills <bcmills@google.com>
Tue, 4 May 2021 20:41:13 +0000 (16:41 -0400)
committerBryan C. Mills <bcmills@google.com>
Tue, 4 May 2021 22:12:42 +0000 (22:12 +0000)
commit62a87f64b97d27e79d53a84e9006425aa234d7e6
treee5b8b47fd14a2cbb4cd61ccaf5711b0abbe071f6
parent6a6aa3278356e850f7530e75e857f539bf8cb51e
cmd/go/internal/modload: only check root-promotion during tidy for lazy modules

In a lazy module, it is important that tidyRoots does not add any new
roots because the dependencies of non-roots are pruned out.

In an eager module, that property is not important (and does not hold
in general) because no dependencies are ever pruned out.

Fixes #45952

Change-Id: I5c95b5696b7112b9219e38af04e0dece7fb6e202
Reviewed-on: https://go-review.googlesource.com/c/go/+/316754
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/modload/load.go
src/cmd/go/testdata/script/mod_tidy_newroot.txt