Skip to content

Commit 592078f

Browse files
author
Bryan C. Mills
committed
cmd/go/internal/work: omit modinfo line from cache key when empty
Cache keys are dumped in case of mismatch; an empty modinfo string adds noise to that dump without a corresponding benefit. For #52009. Change-Id: I1b4cd85fa5ff920973552fc94977954f93622a32 Reviewed-on: https://go-review.googlesource.com/c/go/+/398059 Trust: Bryan Mills <[email protected]> Run-TryBot: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 62bceae commit 592078f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cmd/go/internal/work/exec.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
303303
fmt.Fprintf(h, "fuzz %q\n", fuzzFlags)
304304
}
305305
}
306-
fmt.Fprintf(h, "modinfo %q\n", p.Internal.BuildInfo)
306+
if p.Internal.BuildInfo != "" {
307+
fmt.Fprintf(h, "modinfo %q\n", p.Internal.BuildInfo)
308+
}
307309

308310
// Configuration specific to compiler toolchain.
309311
switch cfg.BuildToolchainName {

0 commit comments

Comments
 (0)