-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Open
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.GoCommandcmd/gocmd/goNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.modules
Milestone
Description
Currently, if you run go mod why -m
on the output of every module in go list -m all
, some modules may come back with the answer (main module does not need module […])
, even after a go mod tidy
.
The reason is that the module graph is conservative: go list -m all
answers the question “which module versions are implied by the requirements of the main module?”, not “which modules does the main module need to download to complete go list all
?”.¹
In contrast, go mod why
explicitly ties its answer to go list all
.
We should have some flag to go mod why
to answer the related go list -m all
question, “what path of requirements imposes the version requirement on module x
?”
¹The command to answer the latter question, as it turns out, is:
go list -f '{{with .Module}}{{.Path}} {{.Version}}{{end}}' all | sort -u
SlyMarbo, mvdan, mwf, pwaller, marwan-at-work and 81 morekomuwagilgur5
Metadata
Metadata
Assignees
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.GoCommandcmd/gocmd/goNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.modules