Failed to compile with clap 3.0.0.beta.5
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
What version of rust are you using?
I think this may be similar to the issue reported in #121
Fedora follow rust stable. we are using rust 1.57 at the moment.
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?
I already try to change it myself but nothing compile after the beta5.
Closing this as I don't find a problem compiling with the clap version specified in the dependencies.
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.
This shouldn't be a problem anymore.