|author||Alan Donovan <firstname.lastname@example.org>||Fri Mar 22 11:32:16 2019 -0400|
|committer||Alan Donovan <email@example.com>||Fri Mar 22 17:29:27 2019 +0000|
go/ssa/interp: make tests fast and robust The go/ssa/interp tests have been a maintenance nightmare for years because the interpreter requires intrinsics for all low-level or non-Go code functions, and the set of such functions in the standard library naturally changes from day to day. This CL finally drops support for interpreting real packages (which has anyway been broken for ages) and restricts the test suite to small programs that use a handful of simple functions in packages bytes, strings, errors, runtime, reflect, and unicode. These functions are declared in a tiny fake standard libary in testdata/src, and the implementations of these functions are provided by interpreter intrinsics that delegate to the real Go implementation---all their parameters and results are basic datatypes. The test suite is now very fast and should be easy to maintain going forward. It is still possible that a change to some file in $GOROOT/test/*.go adds a dependency to a symbol not present in our standard library, but this is rare. I will either delete the test or add the intrinsic on a case-by-case basis. We no longer attempt to interpret major functionality like fmt.Sprintf or "testing". The interpreter always pretends to be in linux/amd64 mode. Happy Christmas, Brad. ;) Fixes golang/go#27292 Change-Id: I715cf63e3534e2e0dab4666a5d7c669bf1d92674 Reviewed-on: https://go-review.googlesource.com/c/tools/+/168898 Run-TryBot: Brad Fitzpatrick <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> Reviewed-by: Brad Fitzpatrick <firstname.lastname@example.org>
This subrepository holds the source for various packages and tools that support the Go programming language.
Some of the tools,
vet for example, are included in binary Go distributions.
Others, including the Go
guru and the test coverage tool, can be fetched with
Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs.
The easiest way to install is to run
go get -u golang.org/x/tools/.... You can also manually git clone the repository to
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.