cmd/go: unclear what ImportMap in "list -json" means #42446
Labels
Documentation
GoCommand
cmd/go
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
I've been writing Go tools and using Go modules for years, and I can't understand what this field means, or when it's used.
My initial suspicion was that it mattered for vendored dependencies, because a user reported a
go list -json
output containing:However, I just created a simple module with vendored dependencies, and
go list -json -deps
does not show anyImportMap
. I also had a brief look at the cmd/go code, and it seems like the map can contain RawImports (no idea what those are either), or imports like runtime/cgo which appear only in generated code.Could we clarify the docs a bit on this? I realise that the doc line should still be one line, but perhaps we can expand on its definition in the text after the type definition, just like the paragraph starting with
Packages stored in vendor directories report an ImportPath...
.The text was updated successfully, but these errors were encountered: