rpg-cli icon indicating copy to clipboard operation
rpg-cli copied to clipboard

Failed to compile with clap 3.0.0.beta.5

Open ghost opened this issue 4 years ago • 7 comments

On fedora compiling with this version of clap doesn’t work. https://kojipkgs.fedoraproject.org//work/tasks/1906/79961906/build.log

error[E0432]: unresolved import clap::Clap --> src/command.rs:10:5 | 10 | use clap::Clap; | ^^^^^^^^^^ no Clap in the root error[E0432]: unresolved import clap::Clap

ghost avatar Dec 14 '21 07:12 ghost

What version of rust are you using?

facundoolano avatar Dec 14 '21 12:12 facundoolano

I think this may be similar to the issue reported in #121

facundoolano avatar Dec 14 '21 12:12 facundoolano

Fedora follow rust stable. we are using rust 1.57 at the moment.

ghost avatar Dec 14 '21 16:12 ghost

One thing that I miss initially, you are failing to compile with clap 3.0.0.beta.5 , but the Cargo.toml specifies 3.0.0-beta.2, do you get the error after changing those versions in the file?

facundoolano avatar Dec 28 '21 13:12 facundoolano

I already try to change it myself but nothing compile after the beta5.

ghost avatar Dec 28 '21 19:12 ghost

Closing this as I don't find a problem compiling with the clap version specified in the dependencies.

facundoolano avatar Feb 10 '22 12:02 facundoolano

You can easily reproduce this issue by just doing

git clone https://github.com/facundoolano/rpg-cli.git
cd rpg-cli
cargo install --path .

The problem is that you need cargo install --locked to use exactly the versions specified in the Cargo.lock file, otherwise those are ignored and it will use the latest compatible versions available from crates.io.

And in this case, it is rather unfortunate that there have been breaking changes between the beta version of clap that you're using and the 3.0.0 stable release. So I guess you'll have to deal with those breaking changes in clap one way or another at some point.

decathorpe avatar Feb 12 '22 17:02 decathorpe

This shouldn't be a problem anymore.

facundoolano avatar Jul 10 '24 13:07 facundoolano