go/src
Jay Conrod 65b89c3542 cmd/go: make get -u upgrade only modules providing packages
Currently, 'go get -u' upgrades modules matching command line
arguments and any modules they transitively require. 'go get -u' with
no positional arguments upgrades all modules transitively required by
the main module. This usually adds a large number of indirect
requirements, which is surprising to users.

With this change, 'go get' will load packages specified by
its arguments using a similar process to other commands
('go build', etc). Only modules providing packages will be upgraded.

'go get -u' now upgrades modules providing packages transitively
imported by the command-line arguments. 'go get -u' without arguments
will only upgrade modules needed by the package in the current
directory.

'go get -m' will load all packages within a module. 'go get -m -u'
without arguments will upgrade modules needed by the main module. It
is equivalent to 'go get -u all'. Neither command will upgrade modules
that are required but not used.

Note that 'go get -m' and 'go get -d' both download modules in order
to load packages.

Fixes #26902

Change-Id: I2bad686b3ca8c9de985a81fb42b16a36bb4cc3ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/174099
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2019-04-30 22:20:57 +00:00
..
archive archive/zip: use Modified in FileHeader.FileInfo 2019-04-08 07:55:52 +00:00
bufio
builtin builtin: spec correction for panic() 2019-04-05 00:52:55 +00:00
bytes bytes, internal/bytealg: simplify Equal 2019-04-24 00:56:36 +00:00
cmd cmd/go: make get -u upgrade only modules providing packages 2019-04-30 22:20:57 +00:00
compress cmd/go: further reduce init work 2019-03-31 10:49:55 +00:00
container
context all: s/cancelation/cancellation/ 2019-04-16 20:27:15 +00:00
crypto all: remove a few unused parameters 2019-04-29 13:31:54 +00:00
database/sql database/sql: add NullInt32 2019-04-26 21:54:41 +00:00
debug all: add new GOOS=illumos, split out of GOOS=solaris 2019-04-30 16:59:13 +00:00
encoding encoding/gob: adding missing fuzz skip to one of the fuzz tests 2019-04-30 18:20:58 +00:00
errors errors: return false if nil error is passed to As 2019-04-10 15:59:35 +00:00
expvar expvar: improve Map.addKey for large number of keys 2019-04-16 17:18:01 +00:00
flag cmd/go: further reduce init work 2019-03-31 10:49:55 +00:00
fmt
go all: add new GOOS=illumos, split out of GOOS=solaris 2019-04-30 16:59:13 +00:00
hash
html html: add a Fuzz function 2019-04-30 15:48:46 +00:00
image image: deprecate ZP and ZR 2019-04-07 03:44:17 +00:00
index/suffixarray
internal bytes, internal/bytealg: simplify Equal 2019-04-24 00:56:36 +00:00
io
log
math math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
mime mime: add .jpeg for builtin 2019-04-03 18:17:48 +00:00
net net/http: make Server return 501 for unsupported transfer-encodings 2019-04-30 19:23:58 +00:00
os os: fix tests on self-hosted Go builds 2019-04-30 20:30:30 +00:00
path
plugin
reflect all: refer to map elements as elements instead of values 2019-04-30 18:18:12 +00:00
regexp
runtime all: refer to map elements as elements instead of values 2019-04-30 18:18:12 +00:00
sort
strconv strconv: Document ParseFloat's special cases 2019-04-29 11:07:31 +00:00
strings strings: remove "a copy of the string" from ToUpper/ToLower comments 2019-04-14 16:19:31 +00:00
sync sync: update comment 2019-04-19 16:15:36 +00:00
syscall all: add new GOOS=illumos, split out of GOOS=solaris 2019-04-30 16:59:13 +00:00
testdata
testing testing: delay flag registration; move to an Init function 2019-04-29 19:54:30 +00:00
text all: remove a few unused parameters 2019-04-29 13:31:54 +00:00
time time: look for zoneinfo.zip in GOROOT 2019-04-30 19:13:43 +00:00
unicode all: update to Unicode 11 2019-04-25 20:33:22 +00:00
unsafe
vendor vendor: pull in text@v0.3.2 2019-04-26 19:27:51 +00:00
Make.dist
all.bash
all.bat
all.rc
bootstrap.bash bootstrap.bash: preserve file times when copying 2019-04-27 14:36:00 +00:00
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
go.mod vendor: pull in text@v0.3.2 2019-04-26 19:27:51 +00:00
go.sum vendor: pull in text@v0.3.2 2019-04-26 19:27:51 +00:00
iostest.bash
make.bash cmd/go: add env -w and env -u to set and unset default env vars 2019-04-23 00:58:08 +00:00
make.bat cmd/go: add env -w and env -u to set and unset default env vars 2019-04-23 00:58:08 +00:00
make.rc cmd/go: add env -w and env -u to set and unset default env vars 2019-04-23 00:58:08 +00:00
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc