Skip to content

Commit 0206eb9

Browse files
dagoodgopherbot
authored andcommitted
README.vendor: add note about GOROOT, recommend fresh go
Using a different build of Go (specifically, a different GOROOT) to maintain the vendor directory doesn't always reproduce the same results. This can result in unknowingly creating a vendor directory that isn't able to build Go. Add a note to README.vendor to point this out. Specifically, mention that a mismatched GOROOT is an issue, and recommend using a fresh build of Go to maintain the vendor directory. Updates #69235 Change-Id: Id80c7607bf28bd76e43e1fdc672811c50f2bffb3 Reviewed-on: https://go-review.googlesource.com/c/go/+/616815 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Sam Thanawalla <[email protected]> Reviewed-by: Sam Thanawalla <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 7f87b82 commit 0206eb9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/README.vendor

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ Before updating vendor directories, ensure that module mode is enabled.
3333
Make sure that GO111MODULE is not set in the environment, or that it is
3434
set to 'on' or 'auto', and if you use a go.work file, set GOWORK=off.
3535

36+
Also, ensure that 'go env GOROOT' shows the root of this Go source
37+
tree. Otherwise, the results are undefined. It's recommended to build
38+
Go from source and use that 'go' binary to update its source tree.
39+
3640
Requirements may be added, updated, and removed with 'go get'.
3741
The vendor directory may be updated with 'go mod vendor'.
3842
A typical sequence might be:

0 commit comments

Comments
 (0)