From 706d85ab79bdae1ababd4b6e5538af053ee7b1ec Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sun, 22 Oct 2023 09:21:21 -0700 Subject: [PATCH] cmd/go/internal/cache: [tailscale] enable cacheprog GOEXPERIMENT by default Updates #77 Updates tailscale/tailscale#9841 Signed-off-by: Brad Fitzpatrick --- src/cmd/go/internal/cache/default.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cmd/go/internal/cache/default.go b/src/cmd/go/internal/cache/default.go index b5650eac669b46..63aa26f81e357a 100644 --- a/src/cmd/go/internal/cache/default.go +++ b/src/cmd/go/internal/cache/default.go @@ -59,7 +59,9 @@ func initDefaultCache() { base.Fatalf("failed to initialize build cache at %s: %s\n", dir, err) } - if v := cfg.Getenv("GOCACHEPROG"); v != "" && goexperiment.CacheProg { + // We don't require the GOEXPERIMENT in Tailscale's Go tree. + const isTailscaleGoTree = true + if v := cfg.Getenv("GOCACHEPROG"); v != "" && (isTailscaleGoTree || goexperiment.CacheProg) { defaultCache = startCacheProg(v, diskCache) } else { defaultCache = diskCache