-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Inconsistent data in cargo metadata
#7841
Comments
I split my demo's commit to make it clear which modify made it wrong, you could check that :p |
I'm inclined to close this. After further inspection, it looks like the issue is related to specifying both a branch and a revision at the same time. Cargo specifically warns about this:
Of course it's probably best for Cargo not to stumble on it, but since it isn't supported to start with, I'm not sure it is worth putting time into. We could change the warning to an error, since it has been around for a few years. Does that sounds reasonable? |
Yeah, I think upgrading to an error would be totally OK here. Well, maybe adding some asserts internally to elevate this to an ICE of sorts would also be prudent, but only if that doesn’t require much new logic. |
Hey, any updates here? 😅 🙏 |
Problem
cargo metadata
produces inconsistent dependency graph (there's an edge to the node which does not exist)Steps
Notice how the
packages
section hasbut the
resolve
section hasNotes
This is using master (c326fcb) cargo. Here's the gist with various printouts:
https://gist.github.com/matklad/eed0d46f427af5abf3c024cc07c59663
(I've added some printfs to the code which produces metadata)
This is what I gather from that output:
#24af5f7
, I assume this is what we want to see.cargo metadata
uses the right#24af5f7
in the deps section, and the wrong one in the packages section.package_map
contains the wrong diesel (this I think the bug)node_map
contains both diesels.I haven't looked into this further yet, as I am hoping someone from cargo team immediately knows what's the issue :)
The text was updated successfully, but these errors were encountered: