]> Cypherpunks repositories - gostls13.git/commit
cmd/go: always update mtime during go install / go build -o / go test -c
authorRuss Cox <rsc@golang.org>
Wed, 8 Nov 2017 18:34:31 +0000 (13:34 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 9 Nov 2017 15:23:19 +0000 (15:23 +0000)
commit183616048a7fe6af4853515ed8ea5bd87d8908b7
tree69cee10259f52d8586add2e0948df06c273e0df6
parent48f2a55aa1e8e13b220419142cadf1347daac5e8
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>
src/cmd/go/go_test.go
src/cmd/go/internal/work/action.go
src/cmd/go/internal/work/exec.go