cargo-outdated icon indicating copy to clipboard operation
cargo-outdated copied to clipboard

Errors when using patch section of Cargo.toml

Open mehcode opened this issue 7 years ago • 6 comments

Here is an example repository: https://github.com/mehcode/cargo-outdated-bug-patch


❯ cargo +nightly outdated
error: Direct dependency reqwest not found for package cargo_outdated_bug

This is using the most recent cargo-outdated installed via cargo install cargo-outdated.

❯ rustc --version
rustc 1.21.0 (3b72af97e 2017-10-09)

❯ cargo --version
cargo 0.22.0 (3423351a5 2017-10-06)

mehcode avatar Dec 08 '17 05:12 mehcode

Thanks for reporting the issue! It seems to be a new feature of cargo? Hmm... Hope it could be gone by adding patch (and replace) to struct Manifest :laughing:

Frederick888 avatar Dec 08 '17 06:12 Frederick888

patch was stabilized in October with 1.21.0 I guess?

I ran into this with replace, which has existed since April 2016. I don't know which release stabilized it, but it was committed into cargo with https://github.com/alexcrichton/cargo/commit/54d738b00affacce24375656c966ca3e1efcdc6b (2016-04-07).

daboross avatar Jan 02 '18 00:01 daboross

Note this also occurs for patch sections located in a workspace, but based on the dependency resolution code in cargo I think a fix would probably work for both workspace and local patches.

Jake-Shadle avatar Mar 26 '18 08:03 Jake-Shadle

I can confirm that the use-cargo-master branch fixes this: https://github.com/kbknapp/cargo-outdated/issues/167#issuecomment-500106777

tangmi avatar Jul 01 '19 23:07 tangmi

Should this be closed now then?

jonhoo avatar Nov 15 '19 16:11 jonhoo

It can be since master includes an updated cargo dependency. Would be good to have a release of cargo-outdated so that installing from crates.io would avoid this issue.

azriel91 avatar Nov 20 '19 03:11 azriel91