]> Cypherpunks repositories - gostls13.git/commit
cmd/go: in 'go mod download' without args, don't save module zip sums
authorJay Conrod <jayconrod@google.com>
Mon, 10 May 2021 22:10:18 +0000 (18:10 -0400)
committerJay Conrod <jayconrod@google.com>
Fri, 21 May 2021 17:49:01 +0000 (17:49 +0000)
commit4fb10b2118cb16445f2d089f79beb3d32db3db12
treeebc010bce51f74dfcaa5cf7ca03c8a0f061f240c
parent4fda54ce3f6761104e835fc4e7847f89e34b7d6d
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 #45332

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>
doc/go1.17.html
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