cargo
cargo copied to clipboard
Unnecessary index fetching upon patching two dependencies with same package name
Problem
If you have two patches on two dependencies with same package name, you will see Updating crates.io index every time you run cargo check. The index update is unnecessary and slows down development speed.
Steps
Simple reproduction repo: https://github.com/ldm0/cargo-bug-repo/tree/31fb297e58ffa3be877062940a300883d2cb580a
- Run cargo check
- Run cargo check (you will still see
Updating crates.io index)
Possible Solution(s)
I'll file a fix PR later.
Notes
No response
Version
Can't find a cargo version which doesn't have this issue.
Sounds like this is a duplicate of #13405. Is that right?
Yeah, the root cause is the same. Bug behaviour differs though.
Since https://github.com/rust-lang/cargo/pull/13572 is merged, I'll go ahead and close this as resolved. Let us know if things are still wrong. Thank you.