]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix mod_install_pkg_version
authorJay Conrod <jayconrod@google.com>
Fri, 16 Apr 2021 17:34:37 +0000 (13:34 -0400)
committerJay Conrod <jayconrod@google.com>
Fri, 16 Apr 2021 18:29:56 +0000 (18:29 +0000)
commit492eb059f9ce08285fae8284e69b1103b63e879e
tree307ff5af29c29e49d9fb66f82647526c0d0911a4
parent60abe013217e224b200b6c3e6da344a6e5af431c
cmd/go: fix mod_install_pkg_version

mainPackagesOnly now includes non-main packages matched by literal
arguments in the returned slice, since their errors must be reported.

GoFilesPackages attaches the same error to its package if
opts.MainOnly is true. This changes the error output of 'go run'
slightly, but it seems like an imporovement.

For #42088

Change-Id: I8f2942470383af5d4c9763022bc94338f5314b07
Reviewed-on: https://go-review.googlesource.com/c/go/+/310829
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/go/internal/load/pkg.go
src/cmd/go/internal/run/run.go
src/cmd/go/testdata/script/mod_install_pkg_version.txt
src/cmd/go/testdata/script/mod_outside.txt
src/cmd/go/testdata/script/mod_run_pkg_version.txt