]> Cypherpunks repositories - gostls13.git/commit
go/build: use the main module's root when locating module sources
authorBryan C. Mills <bcmills@google.com>
Mon, 28 Oct 2019 15:37:24 +0000 (11:37 -0400)
committerBryan C. Mills <bcmills@google.com>
Tue, 29 Oct 2019 19:10:25 +0000 (19:10 +0000)
commit1d4369fa219a2cf6d6f84860e02f0cb3e6afb77a
treea80c6323284ccf5e592a4648c42fb29ae7a39b28
parentca70ada28d567ec257362c052619fa79181e5d4a
go/build: use the main module's root when locating module sources

Previously, we were using srcDir, which would apply the wrong module
dependencies (including the wrong 'replace' and 'exclude' directives)
when locating an import path within a module.

Fixes #34860

Change-Id: Ie59dcc2075a7b51ba40f7cd2f62dae27bf58c9b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/203820
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/go/build/build.go
src/go/build/build_test.go