-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improve the error message for when a patched dependency doesn't resolve to anything #4678
Comments
I've ran into this for the reason as described (I've patched a package with a local dir, cargo updated, and then checked out an earlier version in the patch's target directory), but the Only deleting It's still a bug as of rustc 1.33.0-nightly (e40548bc4 2018-12-21) |
Encountered this in the exact scenario described by @sunjay, when trying to upgrade [[package]]
name = "rustfmt-nightly"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index" in addition to previously patched, local rustfmt [[package]]
name = "rustfmt-nightly"
version = "0.3.2" entry and this fixed the issue. |
@alexcrichton did you fix this recently? |
@Eh2406 I don't think I purposely did but if it was fixed as a side product that'd be nice! (and if so we should certainly add a test for this) |
This is rarely noticed, but when you have old submodules, not updating them will cause you run into rust-lang/cargo#4678.
…Mark-Simulacrum bootstrap: Remove the help fast path This is rarely noticed, but when you have old submodules, not updating them will cause you run into rust-lang/cargo#4678.
…Simulacrum bootstrap: Remove the fast path This is rarely noticed, but when you have old submodules, not updating them will cause you run into rust-lang/cargo#4678. (Reopen of rust-lang#49721) r? @alexcrichton
Ran `cargo update -p quicli` because rust-lang/cargo#4678 told me too.
As there hasn't been any activity here in over 6 months I've marked this as stale and if no further activity happens for 7 days I will close it. I'm a bot so this may be in error! If this issue should remain open, could someone (the author, a team member, or any interested party) please comment to that effect? The team would be especially grateful if such a comment included details such as:
Thank you for contributing! (The cargo team is currently evaluating the use of Stale bot, and using #6035 as the tracking issue to gather feedback.) If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable! |
This is likely still an issue and it is probably that no one has gotten to it yet. |
If you got here when trying to compile |
If you get here and none of the above works I just ran into this error and fixed it by deleting my |
Without this running `cargo build` in the top-level directory on nightly produced an error for me: ``` error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index` Caused by: patch for `wasm-bindgen-futures` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: rust-lang/cargo#4678 ```
Same issue here, only removing |
I just came back to a library crate I have not touched for months and |
If you were brought here from an error message: It may be that the version of a dependency in your Cargo.lock file does not match the version of your patched dependency. You can often fix this by running
cargo update -p <your package name>
. We're working on improving this error message to provide better, more detailed suggestions.If you ran into this error message because of a different reason with a different solution, please let us know in the comments so we can address it. :)
This issue is meant to be a more long term fix than the error message updated in #4607.
From @alexcrichton:
More details from @sunjay in the original PR (#4607)
The specific problem that I ran into occurred when I was trying to upgrade the
rustfmt
submodule in the rust codebase. Therustfmt-nightly
dependency changed version numbers and this conflicted with what was in theCargo.lock
file. After some detective work I was able to find the documentation on[patch]
which I had never read before and the following relevant paragraphs from some other documentation:If it was not for the person who wrote those docs, I would not have known what to do here!
The text was updated successfully, but these errors were encountered: