xh icon indicating copy to clipboard operation
xh copied to clipboard

Update clap to 3.2.17

Open ducaale opened this issue 3 years ago • 1 comments

  • Fix deprecation warnings
    • Replace args_override_self with action specified on each argument
    • Replace parse() with the new value_parser
    • implement ValueParserFactory for Verify See https://github.com/clap-rs/clap/discussions/4007
    • Introduce an enum for TLS version
  • Bump MSRV to 1.56.1

Resolves https://github.com/ducaale/xh/issues/262

ducaale avatar Aug 18 '22 21:08 ducaale

I am yet to find a replacement for args_override_self that works for negation flags

$ cargo run -q -- : --no-json --no-json
error: The argument '--no-json' was provided more than once, but cannot be used multiple times

USAGE:
    xh [OPTIONS] <[METHOD] URL> [--] [REQUEST_ITEM]...

For more information try --help

ducaale avatar Aug 18 '22 22:08 ducaale

  • Replace args_override_self with action specified on each argument

Do we need this? Looks like it's un-deprecated in v4?

It's noisy, and if we forget to add it to an option we might not notice it.

blyxxyz avatar Aug 07 '23 15:08 blyxxyz

Interesting, I wasn't aware that some options were un-deprecated.

I have also reverted to using the un-deprecated get_possible_values() in generate_manpages() to ensure [possible values: ...] is generated for any ArgEnum that doesn't have an explicit name i.e Theme, Pretty and AuthType.

ducaale avatar Aug 12 '23 20:08 ducaale

Do you know how much work it'll be to upgrade to v4 after this?

Apart from a lifetime error which I still need to figure out how to approach, upgrading to v4.0 should require minimal changes.

ducaale avatar Aug 13 '23 15:08 ducaale