tools/internal/cmd/deadcode
Rob Findley 9886d9888c all: get tests passing with 1.18 and 1.19
In order to replace gopls legacy builds on Kokoro with LUCI, it is
easiest to get x/tools tests passing at older Go versions.

This CL gets tests passing at 1.18 and 1.19, using various techniques:
 - Where it was easy to carve out some leave node of the package graph,
   just use go:build directives.
 - Add an internal/compat package with compatibility shims (much like
   the typeparams package, which is coincidentally now obsolete). It
   turns out, the only required shim is Appendf.

Notably, some go/ssa and go/ssa/interp tests recurse infinitely due to
a go/types bug, which was not investigated.

Change-Id: Ib2e6cc8a804ead394a324a4598728b200b24091c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/526264
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
2023-09-11 19:46:14 +00:00
..
testdata internal/cmd/deadcode: a command to report dead code in Go programs 2023-07-10 18:10:37 +00:00
deadcode.go all: get tests passing with 1.18 and 1.19 2023-09-11 19:46:14 +00:00
deadcode_test.go all: get tests passing with 1.18 and 1.19 2023-09-11 19:46:14 +00:00
doc.go internal/cmd/deadcode: a command to report dead code in Go programs 2023-07-10 18:10:37 +00:00