]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document GODEBUG=installgoroot=all
authorRuss Cox <rsc@golang.org>
Sat, 14 Jan 2023 20:08:49 +0000 (15:08 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 17 Jan 2023 16:11:26 +0000 (16:11 +0000)
At the moment the only documentation is the release notes,
but everything mentioned in the release notes should have
proper documentation separate from them.

Change-Id: I9885962f6c6d947039b0be59b608385781479271
Reviewed-on: https://go-review.googlesource.com/c/go/+/462196
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/work/build.go

index 4c72ab6d56f91260f44432a172f0639d8e5ccc3b..84afcab7a036557e039ebbf2d7bb1ffd6902c186 100644 (file)
 // If module-aware mode is enabled, "go install" runs in the context of the main
 // module.
 //
-// When module-aware mode is disabled, other packages are installed in the
+// When module-aware mode is disabled, non-main packages are installed in the
 // directory $GOPATH/pkg/$GOOS_$GOARCH. When module-aware mode is enabled,
-// other packages are built and cached but not installed.
+// non-main packages are built and cached but not installed.
+//
+// Before Go 1.20, the standard library was installed to
+// $GOROOT/pkg/$GOOS_$GOARCH.
+// Starting in Go 1.20, the standard library is built and cached but not installed.
+// Setting GODEBUG=installgoroot=all restores the use of
+// $GOROOT/pkg/$GOOS_$GOARCH.
 //
 // For more about the build flags, see 'go help build'.
 // For more about specifying packages, see 'go help packages'.
index 27fa090f83305ecdf0413cf790d58d221a268fff..2f2860aeb508b08f0e950a26a2a25a6660938598 100644 (file)
@@ -590,9 +590,15 @@ variable and the presence of a go.mod file. See 'go help modules' for details.
 If module-aware mode is enabled, "go install" runs in the context of the main
 module.
 
-When module-aware mode is disabled, other packages are installed in the
+When module-aware mode is disabled, non-main packages are installed in the
 directory $GOPATH/pkg/$GOOS_$GOARCH. When module-aware mode is enabled,
-other packages are built and cached but not installed.
+non-main packages are built and cached but not installed.
+
+Before Go 1.20, the standard library was installed to
+$GOROOT/pkg/$GOOS_$GOARCH.
+Starting in Go 1.20, the standard library is built and cached but not installed.
+Setting GODEBUG=installgoroot=all restores the use of
+$GOROOT/pkg/$GOOS_$GOARCH.
 
 For more about the build flags, see 'go help build'.
 For more about specifying packages, see 'go help packages'.