clap-rs / clap-log-flag

Add a logger to CLIs using structopt
Apache License 2.0
10 stars 1 forks source link

Update versions to work with clap-verbosity-flag #7

Closed gabebw closed 3 years ago

gabebw commented 4 years ago

🐛 This is a bug fix

clap-verbosity-flag depends on structopt 0.3 (https://crates.io/crates/clap-verbosity-flag), while this package currently depends on structopt 0.2.10.

When using clap-verbosity-flag with clap-log-flag, they bring in different versions of StructOpt, which are incompatible.

I see this error in a local project when using structopt = "0.3.17", clap-verbosity-flag = "0.3.1", and clap-log-flag = "0.2.1":

help: trait impl with same name found
   |
19 | #[derive(StructOpt, Debug)]
   |          ^^^^^^^^^
   = note: perhaps two different versions of crate `structopt` are being used?
   = note: required by `structopt::StructOpt::from_clap`

To fix this, depend on the same version of structopt as clap-verbosity-flag, and use a recent version of clap-verbosity-flag in dev-dependencies (so that tests check if everything's working).

Checklist

Context

Semver Changes

Perhaps bump the minor version?