go/src/cmd
Jay Conrod ba3dc70dc5 [release-branch.go1.15] cmd/go: don't report missing std import errors for tidy and vendor
'go mod tidy' and 'go mod vendor' normally report errors when a
package can't be imported, even if the import appears in a file that
wouldn't be compiled by the current version of Go. These errors are
common for packages introduced in higher versions of Go, like "embed"
in 1.16.

This change causes 'go mod tidy' and 'go mod vendor' to ignore
missing package errors if the import path appears to come from the
standard library because it lacks a dot in the first path element.

NOTE: This change is not a clean cherry-pick of CL 298749 because
parts of modload were substantially rewritten after 1.15.

Fixes #44792
Updates #27063

Change-Id: I61d6443e77ab95fd8c0d1514f57ef4c8885a77cc
Reviewed-on: https://go-review.googlesource.com/c/go/+/298749
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>
(cherry picked from commit 56d52e6611)
Reviewed-on: https://go-review.googlesource.com/c/go/+/298950
2021-03-10 21:25:28 +00:00
..
addr2line [release-branch.go1.15] cmd/addr2line: don't assume that GOROOT_FINAL is clean 2020-10-06 23:09:29 +00:00
api [release-branch.go1.15-security] all: introduce and use internal/execabs 2021-01-16 00:29:16 +00:00
asm cmd/asm: fix the encoding error of VCNT instruction for arm64 2020-06-09 15:58:36 +00:00
buildid
cgo [release-branch.go1.15-security] all: introduce and use internal/execabs 2021-01-16 00:29:16 +00:00
compile [release-branch.go1.15] cmd/compile: fix escape analysis of heap-allocated results 2021-03-01 22:02:02 +00:00
cover [release-branch.go1.15-security] all: introduce and use internal/execabs 2021-01-16 00:29:16 +00:00
dist [release-branch.go1.15-security] all: introduce and use internal/execabs 2021-01-16 00:29:16 +00:00
doc [release-branch.go1.15-security] all: introduce and use internal/execabs 2021-01-16 00:29:16 +00:00
fix [release-branch.go1.15-security] all: introduce and use internal/execabs 2021-01-16 00:29:16 +00:00
go [release-branch.go1.15] cmd/go: don't report missing std import errors for tidy and vendor 2021-03-10 21:25:28 +00:00
gofmt go/printer: remove exported StdFormat flag 2020-07-17 02:15:01 +00:00
internal [release-branch.go1.15] cmd/internal/goobj2: fix buglet in object file reader 2021-02-02 22:36:08 +00:00
link [release-branch.go1.15] cmd/link/internal/ld/pe: fix segfault adding resource section 2021-02-02 22:16:35 +00:00
nm Revert "cmd/internal/goobj: add index to symbol name for indexed symbols" 2020-06-03 19:20:41 +00:00
objdump cmd/dist: do not unset GOROOT_FINAL prior to running tests 2020-06-09 02:49:06 +00:00
oldlink cmd/oldlink: port bug fixes to old linker 2020-07-06 20:17:51 +00:00
pack
pprof cmd/objdump: add support for -gnu option on Go objdump 2020-03-30 14:30:49 +00:00
test2json [release-branch.go1.15-security] all: introduce and use internal/execabs 2021-01-16 00:29:16 +00:00
trace [release-branch.go1.15-security] all: introduce and use internal/execabs 2021-01-16 00:29:16 +00:00
vendor cmd: update golang.org/x/xerrors 2020-08-06 19:17:13 +00:00
vet cmd/vet: add ifaceassert and stringintconv checks 2020-03-10 00:47:00 +00:00
README.vendor
go.mod cmd: update golang.org/x/xerrors 2020-08-06 19:17:13 +00:00
go.sum cmd: update golang.org/x/xerrors 2020-08-06 19:17:13 +00:00

README.vendor

See src/README.vendor for information on loading vendored packages
and updating the vendor directory.