Due to the asynchronous and non-transactional nature of the LSP, writing regtests requires waiting for certain conditions to be met in the client editor. To this point, the only type of condition for which we supported waiting was the presence of diagnostic messages, but we can in principle wait for anything that is triggered by a server notification. This change generalizes the notion of expectations to also encompass log messages. Doing this required expanding the value returned from checking expectations to include a new "Unmeetable" verdict, to account for cases where we know that a condition will never be met (for example if it is a negative assertion). This may be useful for diagnostics as well. A test is added to demonstrate these new expectations, where the initial workspace load fails due to unfetchable dependencies. Additionally, some helper flags are added to help debug regtests without a code change, by allowing changing the test timeout, printing logs, and printing goroutine profiles. Updates golang/go#36879 Change-Id: I4cc194e10a4f181ad36a1a7abbb08ff41954b642 Reviewed-on: https://go-review.googlesource.com/c/tools/+/228399 Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
|---|---|---|
| benchmark/parse | ||
| blog | ||
| cmd | ||
| container/intsets | ||
| cover | ||
| go | ||
| godoc | ||
| gopls | ||
| imports | ||
| internal | ||
| playground | ||
| present | ||
| refactor | ||
| txtar | ||
| .gitattributes | ||
| .gitignore | ||
| AUTHORS | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS | ||
| LICENSE | ||
| PATENTS | ||
| README.md | ||
| codereview.cfg | ||
| go.mod | ||
| go.sum | ||
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.