nabijaczleweli / cargo-update

A cargo subcommand for checking and applying updates to installed executables
MIT License
1.22k stars 42 forks source link

`Err` value: "package cargo-unused-features not found" (Mac OS) #205

Closed gitmalong closed 1 year ago

gitmalong commented 1 year ago
user@Air-von-user % cargo install-update -a
    Updating registry 'https://github.com/rust-lang/crates.io-index'

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "package cargo-unused-features not found"', /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-update-11.0.0/src/ops/mod.rs:216:149
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The mentioned package exists https://crates.io/crates/cargo-unused-features

nabijaczleweli commented 1 year ago

hm, I cannot reproduce this:

$ target/debug/cargo-install-update install-update -lai cargo-unused-features
    Updating registry 'https://github.com/rust-lang/crates.io-index'

Package                Installed  Latest   Needs update
cargo-outdated         v0.3.0     v0.11.1  Yes
cargo-unused-features  No         v0.1.7   Yes
cargo-update           v0.8.1     v11.0.0  Yes
$ target/debug/cargo-install-update install-update -la
    Updating registry 'https://github.com/rust-lang/crates.io-index'

Package                Installed  Latest   Needs update
cargo-navigate         v0.1.1     v0.1.1   No
cargo-unused-features  v0.1.7     v0.1.7   No

If (after letting the index update) you still can't, what do you get for git -C ~/.cargo/registry/index/github.com-1ecc6299db9ec823 branch -av?

gitmalong commented 1 year ago

Hm strange. The commands didn't help.

user@.. % cargo install-update -a
    Updating registry 'https://github.com/rust-lang/crates.io-index'

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "package cargo-unused-features not found"', /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-update-11.0.0/src/ops/mod.rs:216:149
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

user@.. % cargo install-update  -lai cargo-unused-features
    Updating registry 'https://github.com/rust-lang/crates.io-index'

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "package cargo-unused-features not found"', /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-update-11.0.0/src/ops/mod.rs:216:149
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

user@.. % cargo install-update  -la                       
    Updating registry 'https://github.com/rust-lang/crates.io-index'

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "package cargo-unused-features not found"', /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-update-11.0.0/src/ops/mod.rs:216:149
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
user@.. % git -C ~/.cargo/registry/index/github.com-1ecc6299db9ec823 branch -av
  remotes/origin/HEAD   f8791e3e8c Updating crate `ci_info#0.14.7`
  remotes/origin/master 0ca2cd911c Updating crate `drawbridge-byte#0.1.0`
nabijaczleweli commented 1 year ago

Huh. Your checkout's origin/HEAD seems to have it but not origin/master, so it's probably that. Our index update procedure pulls refs/heads/master:refs/remotes/origin/master, and this is modelled off Cargo, but maybe Cargo changed how it does updates or something.

nabijaczleweli commented 1 year ago

Can you try the current master branch (at least aa28f9164f5c92f63ae79d84bf2a5fccb2e19d31)?

nabijaczleweli commented 1 year ago

Released in v11.1.0