]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: use vendorMap in findModule
authorBryan C. Mills <bcmills@google.com>
Tue, 9 Oct 2018 21:03:48 +0000 (17:03 -0400)
committerBryan C. Mills <bcmills@google.com>
Fri, 26 Oct 2018 19:50:21 +0000 (19:50 +0000)
commit6a6cbb995c915a0edc0d0e95130b746ef7f8815a
tree2906e24b5bacdb9854af73e97ad1655eddb31afb
parentf8153fcd740483b8c341926acd76b4127c17c789
cmd/go/internal/modload: use vendorMap in findModule

The build list is very incomplete in vendor mode,
so we can't rely on it in general.
findModule may be called in modload.PackageModuleInfo, which
load.LoadImport invokes relatively early during a build.

Before this change, the accompanying test failed at 'go build
-mod=vendor' with the message:

build diamondpoint: cannot find module for path diamondpoint

Change-Id: I5e667d8e406872be703510afeb079f6cbfdbd3c8
Reviewed-on: https://go-review.googlesource.com/c/140861
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/internal/modload/build.go
src/cmd/go/testdata/script/mod_vendor.txt