Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to clap 3.2 #3634

Closed
sylvestre opened this issue Jun 14, 2022 · 3 comments
Closed

Move to clap 3.2 #3634

sylvestre opened this issue Jun 14, 2022 · 3 comments

Comments

@sylvestre
Copy link
Sponsor Contributor

We are using a bunch of things which are now deprecated.

https://epage.github.io/blog/2022/06/clap-32-last-call-before-40/

For example:

warning: use of deprecated associated function `clap::ArgMatches::value_of`: Replaced with `ArgMatches::get_one()`
   --> src/bin/coreutils.rs:156:25
    |
156 |     let shell = matches.value_of("shell").unwrap();
warning: use of deprecated associated function `clap::Arg::<'help>::possible_values`: Replaced with `Arg::value_parser(PossibleValuesParser::new(...)).takes_value(true)`
   --> src/bin/coreutils.rs:150:18
    |
150 |                 .possible_values(Shell::possible_values())
warning: use of deprecated associated function `clap::ArgMatches::values_of`: Replaced with `ArgMatches::get_many()`
   --> src/uu/stdbuf/src/stdbuf.rs:167:38
    |
167 |     let mut command_values = matches.values_of::<&str>(options::COMMAND).unwrap();

See
#3631

@tertsdiepraam
Copy link
Member

I'm very exited about this, but it's gonna be a very big refactor. Sadly, we can't really do this piece by piece, because the multicall binary will break.

@ndd7xv
Copy link
Contributor

ndd7xv commented Jul 9, 2022

It might be worth noting that clap-rs/clap#3830 turns off the deprecations by default for now; fixing the deprecations may still need to be addressed when 4.0 is released and dependabot makes a PR for clap 3.3 (where the deprecation feature may be turned on by default), but for now the warnings won't show up when building/running, and an upgrade to clap 3.2 brings a stabilized Command::multicall to play around with.

@tshepang
Copy link
Contributor

looks like this can now be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants