cmd/go: always update mtime during go install / go build -o / go test -c
Even if the go command can see that the target is up-to-date an mtime-based build system invoking the go command may not be able to tell. Update the mtime to make clear that the target is up-to-date, and also to hide exactly how smart the go command is or is not. This keeps users (and programs) from depending on the exact details of the go command's staleness determination. Without this I believe we will get a stream of (completely reasonable) bug reports that "go install (or go test -c) did not update the binary after I trivially changed the source code or touched a source file". Change-Id: I920e4aaed2a57319e3c0c37717f872bc059e484e Reviewed-on: https://go-review.googlesource.com/76590 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
Showing
Please register or sign in to comment