-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/build: don't check if srcDir in GOPATH when deciding to use modules
go/build.Context.Import loads package information using 'go list' when in module mode. It does this when GO111MODULE is not "off", there is a go.mod file in any parent directory, and neither the path nor the source directory are in GOROOT. Import no longer checks whether the source directory is in GOPATH if GO111MODULE=auto or unset. Also fixed subdirectory checks that did not handle relative source directory paths. mod_gobuild_import should have failed when we changed the meaning of GO111MODULE=auto but didn't because of this. Fixes #32799 Change-Id: Ic5210b7e00cb58f91ea9455b67b49d5aed4eec63 Reviewed-on: https://go-review.googlesource.com/c/go/+/184098 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
- Loading branch information
Jay Conrod
committed
Jun 27, 2019
1 parent
0d4de70
commit f1a8ca3
Showing
2 changed files
with
34 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters