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

Replace gumdrop with clap v3? #298

Closed
tony-iqlusion opened this issue Jun 10, 2020 · 2 comments
Closed

Replace gumdrop with clap v3? #298

tony-iqlusion opened this issue Jun 10, 2020 · 2 comments

Comments

@tony-iqlusion
Copy link
Member

tony-iqlusion commented Jun 10, 2020

There were two primary reasons why Abscissa used gumdrop over clap v2 originally:

  • Previously clap had an excessively large number of dependencies, whereas gumdrop had no dependencies other than proc-macro2, quote, and syn for its proc macro. It seems clap-v3 has done a good job of addressing this (see below).
  • Custom derive support: clap's previous custom derive crate structopt was added as something of an afterthought, had a clunky attribute syntax, and generally felt pretty low quality, whereas gumdrop was effectively a "custom derive first" crate and in that regard felt much more cohesive. That said, clap-v3 now features clap_derive which largely addresses these concerns.

We're now at a crossroads where we can either upgrade to gumdrop v0.8 or consider migrating to clap-v3. Either approach seems a bit difficult as gumdrop v0.8 contains a number of API changes.

The current beta release is clap-v3 3.0.0-beta.2. They warn against depending on the API until it's stable, however.

Tracking issue for clap v3 is here: clap-rs/clap#1037

Dependencies

Here are the transitive dependencies of clap-v3 3.0.0-beta.1 (I haven't fully cross-referenced these with our current ones yet, but I see a lot of commonality):

  • ansi_term 0.12.1
  • atty 0.2.14
  • autocfg 1.0.0
  • bitflags 1.2.1
  • clap-v3 3.0.0-beta.1
  • clap_derive-v3 3.0.0-beta.1
  • heck 0.3.1
  • hermit-abi 0.1.13
  • indexmap 1.4.0
  • lazy_static 1.4.0
  • libc 0.2.71
  • proc-macro-error 0.4.12
  • proc-macro-error-attr 0.4.12
  • proc-macro2 1.0.18
  • quote 1.0.7
  • strsim 0.9.3
  • syn 1.0.31
  • syn-mid 0.5.0
  • textwrap 0.11.0
  • unicode-segmentation 1.6.0
  • unicode-width 0.1.7
  • unicode-xid 0.2.0
  • vec_map 0.8.2
  • version_check 0.9.2
  • winapi 0.3.8
  • winapi-i686-pc-windows-gnu 0.4.0
  • winapi-x86_64-pc-windows-gnu 0.4.0
@leotaku
Copy link
Contributor

leotaku commented Jul 8, 2020

Here are some advantages I personally think a switch to clap would bring:

  • Clap automatically handles things like version and help subcommands and flags
    • Gumdrop struggles with this and requires additional boilerplate from abscissa (e.g. Help)
  • Clap better conforms to the expected behavior for command line applications
  • Clap is much more widely used by the Rust community and thus more likely to be maintained for a long time

@tony-iqlusion tony-iqlusion changed the title Replace gumdrop with clap-v3? Replace gumdrop with clap v3? Nov 12, 2020
@rsdy rsdy mentioned this issue Apr 6, 2021
tarcieri pushed a commit that referenced this issue Oct 6, 2021
As discussed in #298, switches command-line argument processing from
`gumdrop` to `clap` v3.0.0-beta.4.

This release of `clap`, despite still being beta, has moved many of the
warnings around the stability of the API. They are also cutting scope of
an initial release upstream, which are good signs that they will get to
a stable release soon.
tarcieri pushed a commit that referenced this issue Oct 6, 2021
As discussed in #298, switches command-line argument processing from
`gumdrop` to `clap` v3.0.0-beta.4.

This release of `clap`, despite still being beta, has moved many of the
warnings around the stability of the API. They are also cutting scope of
an initial release upstream, which are good signs that they will get to
a stable release soon.
tony-iqlusion added a commit that referenced this issue Oct 6, 2021
As discussed in #298, switches command-line argument processing from
`gumdrop` to `clap` v3.0.0-beta.4.

This release of `clap`, despite still being beta, has moved many of the
warnings around the stability of the API. They are also cutting scope of
an initial release upstream, which are good signs that they will get to
a stable release soon.

Co-authored-by: rsdy <me@rhapsodhy.hu>
@tony-iqlusion
Copy link
Member Author

gumdrop was replaced with clapv3 in #562.

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

Successfully merging a pull request may close this issue.

2 participants