Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cmd/go: unclear what ImportMap in "list -json" means #42446
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
However, I just created a simple module with vendored dependencies, and
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
Ah, it seems like ImportMap is used for vendored packages in the standard library, but not in the current module:
This seems to be what I was running into. It's still unclear to me why vendored packages only appear in ImportMap in this case, but not others.
In module mode it is indeed less useful, because we now have only one copy of each module dependency (instead of one per