-
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
cargo add spurious failure #14914
Comments
Normally I'd expect this from something like #10623 but I'm not seeing anything in the manifest that would suggest an old cargo wouldn't understand the Index entry and it would require somehow using an older cargo than intended. |
Attaching the lockfile just in case something jumps out, but given dummy is written by the fake author and isn't used by something else it's a bit weird... I have used fake on an older project so maybe an older version cached? I'm really not sure and I've been unable to recreate it though 😓 |
Not seeing anything in that lockfile that would give me pause. Is this open source where you can point us to a specific commit to reproduce this on? Or could you capture a log, redact that, and post it? e.g. $ CARGO_LOG=cargo::core::resolver=trace cargo add --dev fake --features "uuid derive" If there isn't a message in that log saying why a version was ignored, maybe try blowing away your |
It's not open source unfortunately! So I've tried it on past commits, also nuked registry and nuked registry added fake 2.7.0 and then removed it from the project and added fake 3.0 and none of them have managed to reproduce it. Once I had the issue all the cargo add calls for fake failed potentially because I tried to tweak some other deps and rerun I'll happily try any other ideas you have but I'm at a loss on recreating it after all these tries |
Were you able to get a log? Could you post |
The log had:
which just seems correct. And the registry contents is:
|
Hmm, the cache has the new entries {
"name": "dummy",
"vers": "0.9.0",
"deps": [
{
"name": "darling",
"req": "^0.20",
"features": [],
"optional": false,
"default_features": false,
"target": null,
"kind": "normal"
},
{
"name": "proc-macro2",
"req": "^1",
"features": [],
"optional": false,
"default_features": false,
"target": null,
"kind": "normal"
},
{
"name": "quote",
"req": "^1.0",
"features": [],
"optional": false,
"default_features": false,
"target": null,
"kind": "normal"
},
{
"name": "syn",
"req": "^2.0",
"features": [],
"optional": false,
"default_features": false,
"target": null,
"kind": "normal"
}
],
"cksum": "07f39256702ef25dc3381a19aece91eb5c803506de0f79b01b6aa0fea64b32c2",
"features": {},
"yanked": false,
"rust_version": "1.63"
} which matches mine {
"name": "dummy",
"vers": "0.9.0",
"deps": [
{
"name": "darling",
"req": "^0.20",
"features": [],
"optional": false,
"default_features": false,
"target": null,
"kind": "normal"
},
{
"name": "proc-macro2",
"req": "^1",
"features": [],
"optional": false,
"default_features": false,
"target": null,
"kind": "normal"
},
{
"name": "quote",
"req": "^1.0",
"features": [],
"optional": false,
"default_features": false,
"target": null,
"kind": "normal"
},
{
"name": "syn",
"req": "^2.0",
"features": [],
"optional": false,
"default_features": false,
"target": null,
"kind": "normal"
}
],
"cksum": "07f39256702ef25dc3381a19aece91eb5c803506de0f79b01b6aa0fea64b32c2",
"features": {},
"yanked": false,
"rust_version": "1.63"
} and I see nothing suspicous |
Problem
Looking at the packages on crates.io I can't see a good reason for this so there's a chance it should be an issue cargo side.
Hmm just tried cargo add on a clean project and it works so it's definitely a cargo issue. I also removed fake from the manifest where it didn't work and manually wrote the entry and did a cargo check and it grabbed dummy 0.9 as expected. So maybe this is some temporary registry failure?
I've been trying to reproduce this in a clean project and I haven't managed to yet... So hopefully it's something someone here can instantly see what's up or I'll have to keep trying.
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: