Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: print an incomplete go mod graph even if an error occurs #32932

Open
jeanbza opened this issue Jul 4, 2019 · 0 comments
Open

cmd/go: print an incomplete go mod graph even if an error occurs #32932

jeanbza opened this issue Jul 4, 2019 · 0 comments
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@jeanbza
Copy link
Member

jeanbza commented Jul 4, 2019

go mod graph is an invaluable tool for debugging module problems. It allows us to see problems deep into our transitive dependencies. However, it completely falls over if there is a single issue somewhere in the graph, and if that issue is not at the root module it's quite hard to debug transitive dependency problems.

Consider, for example:

$ go mod graph
go: finding github.com/kr/pty v1.1.7
go: github.com/kr/pty@v1.1.7: unknown revision v1.1.7
go: error loading module requirements
$

It would be ideal if the go mod graph command traversed and printed as much of the graph as possible, and indicated which nodes were problematic. For example:

$ go mod graph
A B
B C
C github.com/kr/pty@v1.1.7--ERROR
go: github.com/kr/pty@v1.1.7: unknown revision v1.1.7
go: error loading module requirements

(last two lines are STDERR, first three are STDOUT)

@dmitshur dmitshur added GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jul 4, 2019
@dmitshur dmitshur added this to the Go1.14 milestone Jul 4, 2019
@dmitshur dmitshur changed the title mod: print an incomplete go mod graph even if an error occurs cmd/go: print an incomplete go mod graph even if an error occurs Jul 4, 2019
@bcmills bcmills added the modules label Jul 8, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants