diff options
author | Bryan C. Mills <bcmills@google.com> | 2021-06-08 15:53:08 -0400 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2021-06-10 19:59:02 +0000 |
commit | 8d11b1d1172817359d08231deaf29f72d315b762 (patch) | |
tree | 2160a903ff721d086a71f5910574ddf4bb895a30 /src/cmd/go/internal/load/pkg.go | |
parent | dc00dc6c6bf3b5554e37f60799aec092276ff807 (diff) | |
download | go-8d11b1d1172817359d08231deaf29f72d315b762.tar.gz go-8d11b1d1172817359d08231deaf29f72d315b762.zip |
cmd/go: report the imports of CompiledGoFiles in ImportMap
Ideally we should encode the load.PackageInternal data in a way that
doesn't rely on 1:1 correlations of slices, but this is a minimal fix
to unblock Go 1.17.
Fixes #46462
Change-Id: I6e029c69f757aadc54d4be02c01d6b294c217542
Reviewed-on: https://go-review.googlesource.com/c/go/+/326610
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/cmd/go/internal/load/pkg.go')
-rw-r--r-- | src/cmd/go/internal/load/pkg.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go index 738904865e..a83cc9a812 100644 --- a/src/cmd/go/internal/load/pkg.go +++ b/src/cmd/go/internal/load/pkg.go @@ -194,8 +194,8 @@ type PackageInternal struct { // Unexported fields are not part of the public API. Build *build.Package Imports []*Package // this package's direct imports - CompiledImports []string // additional Imports necessary when using CompiledGoFiles (all from standard library) - RawImports []string // this package's original imports as they appear in the text of the program + CompiledImports []string // additional Imports necessary when using CompiledGoFiles (all from standard library); 1:1 with the end of PackagePublic.Imports + RawImports []string // this package's original imports as they appear in the text of the program; 1:1 with the end of PackagePublic.Imports ForceLibrary bool // this package is a library (even if named "main") CmdlineFiles bool // package built from files listed on command line CmdlinePkg bool // package listed on command line |