]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go: in lazy modules, add transitive imports for 'go get' arguments
authorBryan C. Mills <bcmills@google.com>
Tue, 15 Jun 2021 16:05:01 +0000 (12:05 -0400)
committerBryan C. Mills <bcmills@google.com>
Wed, 16 Jun 2021 20:38:07 +0000 (20:38 +0000)
commit0e67ce3d28320e816dd8e7cf7d701c1804fb977e
treefd02890576aa168e1d67423b22ad12de09e4fed9
parent6ea2af0890260fec6cc951b5f426c0464e43266d
cmd/go: in lazy modules, add transitive imports for 'go get' arguments

I needed to also update TestScript/mod_sumdb_golang.
It had been relying on 'go list -mod=mod' to add both the go.mod and
go.sum entries for the named package, but when 'go get' actually adds
all of the needed dependencies, lazy loading kicks in and 'go list'
doesn't end up needing the checksums for go.mod files.
We didn't detect the skew before because the 'go list' command was
(unexpectedly) also adding the missing dependencies, which triggered a
deep scan of the complete module graph.

For #45979

Change-Id: Ica917dee22c83ffa71c6ad0f2e189f911b73edf4
Reviewed-on: https://go-review.googlesource.com/c/go/+/328231
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/modget/get.go
src/cmd/go/internal/modload/buildlist.go
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/modload/load.go
src/cmd/go/testdata/script/mod_get_lazy_indirect.txt
src/cmd/go/testdata/script/mod_sumdb_golang.txt