Radar · Go · Archive · Week 25 · Jun 15 – 21, 2026
cmd/go: only set vcs.modified=true if changes are relevant to build
Worth knowingtooling
- What changed
- The
gocommand now setsvcs.modified=trueonly when the modifications affect files used by the current build or by the same build in a clean repository. - Production impact
- The source does not say.
- Try it
- Run
go buildin a repository, add an unrelated file, then rungo installand check the binary’s build info for thevcs.modifiedflag. - Source
- github.com/golang/go/issues/77897
Understand it, then run it
The go command used to mark a repository as “modified” whenever any file changed, even if that file had nothing to do with the code you were building. When you built a program, the binary’s build info would show vcs.modified=true and the module path would get a +dirty suffix, even if the change was just an unrelated log file or a temporary profile. The change now limits that flag. It is set only when the modified files are ones that the current build actually uses, or when a file that the build uses in a clean repository has been removed. This means the +dirty suffix now better reflects whether the binary differs from the source you built.
Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed