cmd/go: go mod -graph
erroneously lists edges from the main module to indirect dependencies
#26489
Labels
Milestone
In
modload
, we intentionally treat the main module as requiring the entire build list. (I don't recall why, but we do.)go/src/cmd/go/internal/modload/load.go
Line 742 in d365890
Unfortunately, that interacts badly with
go mod -graph
, which fails to take the extra requirements into account. We end up printing spurious edges from the main module to all of its transitive dependencies.Note the spurious line:
Found while investigating #26474.
The text was updated successfully, but these errors were encountered: