• Bryan C. Mills's avatar
    cmd/go/internal/modload: use vendorMap in findModule · 6a6cbb99
    Bryan C. Mills authored
    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: default avatarRuss Cox <rsc@golang.org>
    6a6cbb99
build.go 6.26 KB