go/src/cmd
Alan Donovan 8121604559 go/types: don't fail fast on Go version errors
Many tools (especially in the IDE) rely on type information
being computed even for packages that have some type errors.
Previously, there were two early (error) exits in checkFiles
that violated this invariant, one related to FakeImportC
and one related to a too-new Config.GoVersion.
(The FakeImportC one is rarely encountered in practice,
but the GoVersion one, which was recently downgraded from
a panic by CL 507975, was a source of crashes
due to incomplete type information.)

This change moves both of those errors out of checkFiles
so that they report localized errors and don't obstruct
type checking. A test exercises the errors, and that
type annotations are produced.

Also, we restructure and document checkFiles to make clear
that it is never supposed to stop early.

Updates #66525

Change-Id: I9c6210e30bbf619f32a21157f17864b09cfb5cf2
Reviewed-on: https://go-review.googlesource.com/c/go/+/574495
Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-03 22:50:48 +00:00
..
addr2line cmd: remove support for GOROOT_FINAL 2024-02-21 22:16:54 +00:00
api cmd/api: include type arguments in API 2024-01-26 19:39:32 +00:00
asm cmd/compile: support float min/max instructions on PPC64 2024-04-01 18:50:29 +00:00
buildid
cgo cmd/cgo: update outdated docs about cgocheck2 2024-03-31 09:02:45 +00:00
compile go/types: don't fail fast on Go version errors 2024-04-03 22:50:48 +00:00
covdata cmd/covdata: fix typo in comment 2024-03-12 17:17:47 +00:00
cover runtime: migrate internal/atomic to internal/runtime 2024-03-25 19:53:03 +00:00
dist cmd/compile,cmd/preprofile: move logic to shared common package 2024-03-27 20:20:01 +00:00
distpack cmd/distpack: include directory entries in tar files 2023-08-11 17:37:52 +00:00
doc cmd/doc: fix inconsistent receiver name 2024-01-08 20:15:52 +00:00
fix cmd/fix: support go versions with patch release 2024-02-22 05:31:47 +00:00
go cmd/go/internal/modload: close modules.txt 2024-04-02 20:07:23 +00:00
gofmt cmd/gofmt: remove impossible err!=nil conditional 2024-02-26 21:42:29 +00:00
internal all: use kind* of abi 2024-04-02 15:10:48 +00:00
link internal/abi: clean up type of Kind and Type.Kind_ 2024-04-02 16:25:18 +00:00
nm
objdump cmd: remove support for GOROOT_FINAL 2024-02-21 22:16:54 +00:00
pack
pprof runtime,runtime/pprof: get memory mappings on darwin. 2023-08-03 16:07:59 +00:00
preprofile cmd/compile,cmd/preprofile: move logic to shared common package 2024-03-27 20:20:01 +00:00
relnote cmd/relnote: fix API relnote check 2024-02-05 16:31:53 +00:00
test2json
tools
trace cmd/trace/v2: fix typo in comment 2024-03-11 17:07:59 +00:00
vendor cmd: update vendored x/tools to 904c6ba 2024-04-02 02:20:05 +00:00
vet cmd: update vendored x/tools to 904c6ba 2024-04-02 02:20:05 +00:00
README.vendor
go.mod cmd: update vendored x/tools to 904c6ba 2024-04-02 02:20:05 +00:00
go.sum cmd: update vendored x/tools to 904c6ba 2024-04-02 02:20:05 +00:00

README.vendor

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