-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: 1.17 go mod tidy
produces go.mod files that cannot be used with go mod graph
to understand the source of dependencies
#47648
Comments
go mod tidy
produces go.mod files that cannot be used with go mod graph
to understand the source of dependenciesgo mod tidy
produces go.mod files that cannot be used with go mod graph
to understand the source of dependencies
I don't think The dependency edges added for |
The tools that we have today for analyzing the reason a dependency is needed are There are also some third-party tools that build on top of those tools to provide more structure and support more detailed queries. (For example, some folks on the Gophers Slack this morning were recommending |
Understood, but in that scenario, the module had an explicit opinion about the transitive dep, so representing an edge made sense. I think it's unfortunate that the graph representation we previously got for free using |
Working on switching to use |
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
hoisted from discussion at #46366 (comment)
Tidied a module with direct and indirect dependencies and ran through dependency stats checking tools based on
go mod graph
.What did you expect to see?
Useful module graph output.
go1.16 produces this:
What did you see instead?
go1.17rc2 produces this:
That shows an edge from
example → github.com/liggitt/tidy-117/c
which does not actually exist... it is only transitive viagithub.com/liggitt/tidy-117/b
.go mod graph
is currently useful for understanding subtrees of tidied dependencies, and piping to graph visualization tools like dot to find candidates for reducing dependencies.The 1.17 changes to
go mod tidy
add edges that makego mod graph
unsuitable for this.The text was updated successfully, but these errors were encountered: