]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc/go1.22: document workspace vendoring
authorBryan C. Mills <bcmills@google.com>
Mon, 11 Dec 2023 16:29:36 +0000 (11:29 -0500)
committerGopher Robot <gobot@golang.org>
Mon, 11 Dec 2023 19:59:27 +0000 (19:59 +0000)
For #61422.
Updates #60056.

Change-Id: Ie7c7e12acc173f1ff1644555016e51a52509bd6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/548815
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

doc/go1.22.html

index 414f30e6fb4d4e46f5a2cda79a6a8e623b1ef1ca..631184a0e802c963af5b5c74c5a16da2b964b9bb 100644 (file)
@@ -67,7 +67,20 @@ func main() {
 
 <!-- https://go.dev/issue/60056 -->
 <p>
-  <!-- support vendoring in workspace mode -->
+  Commands in <a href="https://go.dev/ref/mod#workspaces">workspaces</a> can now
+  use a <code>vendor</code> directory containing the dependencies of the
+  workspace. The directory is created by
+  <a href="/pkg/cmd/go#hdr-Make_vendored_copy_of_dependencies"><code>go</code> <code>work</code> <code>vendor</code></a>,
+  and used by build commands when the <code>-mod</code> flag is set to
+       <code>vendor</code>, which is the default when a workspace <code>vendor</code>
+  directory is present.
+</p>
+<p>
+  Note that the <code>vendor</code> directory's contents for a workspace are different
+  from those of a single module: if the directory at the root of a workspace also
+  contains one of the modules in the workspace, its <code>vendor</code> directory
+  can contain the dependencies of either the workspace or of the module,
+  but not both.
 </p>
 
 <!-- CL 518775 -->