]> Cypherpunks repositories - gostls13.git/commit
cmd/go: enter vendor mode depending on new modules.txt workspace line
authorMichael Matloob <matloob@golang.org>
Wed, 26 Jul 2023 18:09:06 +0000 (14:09 -0400)
committerMichael Matloob <matloob@golang.org>
Fri, 11 Aug 2023 01:59:23 +0000 (01:59 +0000)
commit33cdafed5213a17d23baa92568ede4bb16e7af0c
tree7f6c9977da93b6ebf51621ab5a0b6c8b4aac758a
parent5abf00e4f0039aebac17b15203b09c4a8962aac0
cmd/go: enter vendor mode depending on new modules.txt workspace line

modules.txt gets a new ## workspace line at the start of the file if
it's generated in workspace mode. Then, when deciding whether the go
command runs in mod=vendor, we only do so if we're in the same mode
(workspace or not) as the modules.txt specifies.

For #60056

Change-Id: If478a9891a7135614326fcb80c4c33a431e4e531
Reviewed-on: https://go-review.googlesource.com/c/go/+/513756
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
src/cmd/go/internal/modcmd/vendor.go
src/cmd/go/internal/modload/init.go
src/cmd/go/testdata/script/work_vendor_modules_txt_conditional.txt [new file with mode: 0644]
src/cmd/go/testdata/script/work_vendor_modules_txt_consistent.txt
src/cmd/go/testdata/script/work_vendor_prune.txt
src/cmd/go/testdata/script/work_vendor_prune_all.txt