]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document 'go install cmd@version' ignores vendor directories
authorJay Conrod <jayconrod@google.com>
Mon, 13 Sep 2021 16:16:39 +0000 (09:16 -0700)
committerJay Conrod <jayconrod@google.com>
Mon, 13 Sep 2021 17:26:12 +0000 (17:26 +0000)
For #48332

Change-Id: I708eb3e8f3f386f03210b7117d9ab8b0be2125bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/349591
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/work/build.go

index 425aa831d88b8ac3673d4893ff6897eef8d353ff..b7e82127959b852b2fd7f7be5c625b2bf5a9fbe5 100644 (file)
 //
 // - All arguments must refer to packages in the same module at the same version.
 //
+// - Package path arguments must refer to main packages. Pattern arguments
+// will only match main packages.
+//
 // - No module is considered the "main" module. If the module containing
 // packages named on the command line has a go.mod file, it must not contain
 // directives (replace and exclude) that would cause it to be interpreted
 // differently than if it were the main module. The module must not require
 // a higher version of itself.
 //
-// - Package path arguments must refer to main packages. Pattern arguments
-// will only match main packages.
+// - Vendor directories are not used in any module. (Vendor directories are not
+// included in the module zip files downloaded by 'go install'.)
 //
 // If the arguments don't have version suffixes, "go install" may run in
 // module-aware mode or GOPATH mode, depending on the GO111MODULE environment
index c51dd398c241f79a42ee9aaca8e246686a86e4d1..3d7c778a7dda366eca875e9297d86328e881c1f1 100644 (file)
@@ -496,14 +496,17 @@ allowed, even if they refer to the same version.
 
 - All arguments must refer to packages in the same module at the same version.
 
+- Package path arguments must refer to main packages. Pattern arguments
+will only match main packages.
+
 - No module is considered the "main" module. If the module containing
 packages named on the command line has a go.mod file, it must not contain
 directives (replace and exclude) that would cause it to be interpreted
 differently than if it were the main module. The module must not require
 a higher version of itself.
 
-- Package path arguments must refer to main packages. Pattern arguments
-will only match main packages.
+- Vendor directories are not used in any module. (Vendor directories are not
+included in the module zip files downloaded by 'go install'.)
 
 If the arguments don't have version suffixes, "go install" may run in
 module-aware mode or GOPATH mode, depending on the GO111MODULE environment