]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add cache verification mode
authorRuss Cox <rsc@golang.org>
Wed, 1 Nov 2017 23:57:50 +0000 (19:57 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 2 Nov 2017 04:06:53 +0000 (04:06 +0000)
commit15f07dbf59e223ca3116eb57868632082657d3a6
treed2ce976f864188f71aa3be9addaf2fa762892994
parentc604792d28334d07fb6c86893d7f352d89e06949
cmd/go: add cache verification mode

If GODEBUG=gocacheverify=1, then instead of using the cache to
avoid computations, the go command will do the computations and
double-check that they match any existing cache entries.
This is handled entirely in the cache implementation; there's no
complexity added to any of the cache usage sites.

(As of this CL there aren't any cache usage sites, but soon there will be.)

Also change GOCMDDEBUGHASH to the more usual GODEBUG=gocachehash=1.

Change-Id: I574f181e06b5299b1d9c6d402e40c57a0e064e74
Reviewed-on: https://go-review.googlesource.com/75294
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/cmd/dist/build.go
src/cmd/dist/deps.go
src/cmd/go/internal/cache/cache.go
src/cmd/go/internal/cache/cache_test.go
src/cmd/go/internal/cache/hash.go