7dc6b39912
The memoize store passes a detached context to the value getter function. This is important since if the value getter experiences a context cancellation it will end up caching context.Canceled, which you never want. When type checking, we were ignoring the detached context and using the "real" request context. This would cause the context.Canceled error to get cached and continue popping up in various situations. Fix by swapping the importer's context to the detached context. It is a little messy since the importer stores the context as a field. I added a defer to restore the original context since it doesn't seem correct to let the detached context escape the memoize function. Updates golang/go#33678 Change-Id: I20dd466b0072ac2e856adbe993364f77e93ab054 Reviewed-on: https://go-review.googlesource.com/c/tools/+/192719 Reviewed-by: Rebecca Stambler <rstambler@golang.org> Run-TryBot: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
benchmark/parse | ||
blog | ||
cmd | ||
container/intsets | ||
cover | ||
go | ||
godoc | ||
gopls | ||
imports | ||
internal | ||
playground | ||
present | ||
refactor | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
go.mod | ||
go.sum | ||
LICENSE | ||
PATENTS | ||
README.md |
Go Tools
This subrepository holds the source for various packages and tools that support the Go programming language.
Some of the tools, godoc
and vet
for example, are included in binary Go
distributions.
Others, including the Go guru
and the test coverage tool, can be fetched with
go get
.
Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs.
Download/Install
The easiest way to install is to run go get -u golang.org/x/tools/...
. You can
also manually git clone the repository to $GOPATH/src/golang.org/x/tools
.
Report Issues / Send Patches
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the tools repository is located at https://github.com/golang/go/issues. Prefix your issue with "x/tools/(your subdir):" in the subject line, so it is easy to find.