Documentation
¶
Overview ¶
staletools reports which installed Go tools were built with an older toolchain — and, of those, which actually PARSE GO SOURCE, because only for those is staleness a wrong answer rather than an old binary.
THE DISTINCTION, WHICH IS THE WHOLE TOOL ¶
A CLI built with go1.26 runs perfectly well under a go1.27 toolchain. It is old, not broken, and telling somebody to rebuild it is noise.
A tool that analyses Go source embeds go/types, go/parser and friends FROM ITS BUILD TOOLCHAIN. Built with go1.26 it cannot read go1.27, and it does not fail cleanly — it emits a page of type errors about the standard library and then reports on whatever it managed to load:
rand.go:213:17: method must have no type parameters -: This application uses version go1.26 of the source-processing packages but runs version go1.27 of 'go list'.
Measured 2026-10-08: `deadcode` did exactly that across go-pkgx, and the output reads like findings. After a rebuild it reported 0 — a figure that means something only because a deliberately unreachable function was added first to prove the tool could still see one.
IT DOES NOT GUESS WHICH TOOLS THOSE ARE ¶
`go version -m` already prints the toolchain and the module graph. What it does not do is say which entries matter. This reads the same build info and looks for the source-processing packages in the DEPENDENCY LIST — go/types is in the standard library, so the signal is the x/tools and analysis modules a source reader must import. That is evidence out of the binary, not a list of names somebody maintained.
AND IT FINDS THE DUPLICATE, WHICH IS THE QUIET ONE ¶
A tool installed in two directories — ~/go/bin because `go install` puts it there, ~/.local/bin because somebody put it there deliberately — runs whichever PATH reaches first. Observed on this machine: every fleet scanner present twice, the ~/.local/bin copies current and the ~/go/bin copies four months behind. Nothing was wrong until a shell added ~/go/bin.