From: Sean Liao Date: Mon, 2 Dec 2024 18:32:36 +0000 (+0000) Subject: cmd/go: document the build cache as safe for concurrent use X-Git-Tag: go1.24rc1~3^2~17 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e79b2e1e3acbce03b04f4ae95a8884183006bd1e;p=gostls13.git cmd/go: document the build cache as safe for concurrent use Fixes #26677 Change-Id: I2ca0408503000ccaddb0bd1fd359381ddd4fb699 Reviewed-on: https://go-review.googlesource.com/c/go/+/632895 Reviewed-by: Michael Matloob Auto-Submit: Sam Thanawalla LUCI-TryBot-Result: Go LUCI Reviewed-by: Sam Thanawalla --- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index f227d93de7..3a4473902c 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -2264,6 +2264,7 @@ // The go command caches build outputs for reuse in future builds. // The default location for cache data is a subdirectory named go-build // in the standard user cache directory for the current operating system. +// The cache is safe for concurrent invocations of the go command. // Setting the GOCACHE environment variable overrides this default, // and running 'go env GOCACHE' prints the current cache directory. // diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go index d373c675f6..e1240de710 100644 --- a/src/cmd/go/internal/help/helpdoc.go +++ b/src/cmd/go/internal/help/helpdoc.go @@ -809,6 +809,7 @@ var HelpCache = &base.Command{ The go command caches build outputs for reuse in future builds. The default location for cache data is a subdirectory named go-build in the standard user cache directory for the current operating system. +The cache is safe for concurrent invocations of the go command. Setting the GOCACHE environment variable overrides this default, and running 'go env GOCACHE' prints the current cache directory.