]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.16] cmd/go: in 'go mod download' without args, don't save module...
authorJay Conrod <jayconrod@google.com>
Mon, 10 May 2021 22:10:18 +0000 (18:10 -0400)
committerCarlos Amedee <carlos@golang.org>
Wed, 2 Jun 2021 18:51:58 +0000 (18:51 +0000)
commitdbf69b7da49b64547ae3a0d54043c0d1f895a0fc
treeab5f2841a78b7b5c16d8b762265fae10662dbdfd
parent40b97d69218c5f31cf444a5dd1883799f94d9ffa
[release-branch.go1.16] cmd/go: in 'go mod download' without args, don't save module zip sums

'go mod download' without arguments is frequently used to populate the
module cache. It tends to fetch a lot of extra files (for modules in
the build list that aren't needed to build packages in the main
module). It's annoying when sums are written for these extra files.

'go mod download mod@version' will still write sums for specific
modules in the build list. 'go mod download all' still has the
previous behavior.

For now, all invocations of 'go mod download' still update go.mod and
go.sum with changes needed to load the build list (1.15 behavior).

Fixes #46214

Change-Id: I9e17d18a7466ac7271a0e1a2b663f6b3cb168c97
Reviewed-on: https://go-review.googlesource.com/c/go/+/318629
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
(cherry picked from commit 4fb10b2118cb16445f2d089f79beb3d32db3db12)
Reviewed-on: https://go-review.googlesource.com/c/go/+/321892
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/go/internal/modcmd/download.go
src/cmd/go/testdata/mod/rsc.io_sampler_v1.2.1.txt
src/cmd/go/testdata/script/mod_download.txt
src/cmd/go/testdata/script/mod_get_trailing_slash.txt
src/cmd/go/testdata/script/mod_query.txt
src/cmd/go/testdata/script/mod_retract.txt