-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Updating Cargo.lock can result in dependency cycle #65014
Comments
Looks like Cargo is correct here but it's a bad error message. I'll work on the error message independently, but the real error is:
This happens because |
Note that this is an instance of rust-lang/cargo#4866 where the host |
Oh it's nasty one. Thanks for the explanation, it's clear now. |
First reported in rust-lang/rust#65014 it looks like our error message on cyclic dependencies may be confusing at times. It looks like this is an issue because there are multiple paths through a graph for a dependency, so using the generic `path_to_top` function isn't producing the most useful path for this purpose. We're already walking the graph though, so this commit adds an extra parameter which collects the list of packages we've visited so far to produce a hopefully always-accurate error message showing the chain of dependencies end-to-end for what depends on what.
Improve error message for cyclic dependencies First reported in rust-lang/rust#65014 it looks like our error message on cyclic dependencies may be confusing at times. It looks like this is an issue because there are multiple paths through a graph for a dependency, so using the generic `path_to_top` function isn't producing the most useful path for this purpose. We're already walking the graph though, so this commit adds an extra parameter which collects the list of packages we've visited so far to produce a hopefully always-accurate error message showing the chain of dependencies end-to-end for what depends on what.
Bumping few packages can result in dependency cycle.
Single command reproducer:
cc @alexcrichton
The text was updated successfully, but these errors were encountered: