clap/CHANGELOG.md
2018-07-02 15:06:46 -04:00

6.5 KiB

v0.2.10 (2018-06-07)

  • 1.21.0 is the minimum required rustc version by @TeXitoi

v0.2.9 (2018-06-05)

  • Fix a bug when using flatten by @fbenkstein
  • Update syn, quote and proc_macro2 by @TeXitoi
  • Fix a regression when there is multiple authors by @windwardly

v0.2.8 (2018-04-28)

  • Add StructOpt::from_iter_safe(), which returns an Error instead of killing the program when it fails to parse, or parses one of the short-circuiting flags. (#98 by @quodlibetor)
  • Allow users to enable clap features independently by @Kerollmops
  • Fix a bug when flattening an enum (#103 by @TeXitoi

v0.2.7 (2018-04-12)

  • Add flattening, the insertion of options of another StructOpt struct into another (#92) by @birkenfeld
  • Fail compilation when using default_value or required with Option (#88) by @Kerollmops

v0.2.6 (2018-03-31)

v0.2.5 (2018-03-07)

v0.2.4 (2018-02-25)

v0.2.3 (2018-02-16)

  • An empty line in a doc comment will result in a double linefeed in the generated about/help call by @TeXitoi

v0.2.2 (2018-02-12)

v0.2.1 (2018-02-11)

  • Fix a bug around enum tuple and the about message in the global help by @TeXitoi
  • Fix #65 by @TeXitoi

v0.2.0 (2018-02-10)

Breaking changes

Don't special case u64 by @SergioBenitez

If you are using a u64 in your struct to get the number of occurence of a flag, you should now add parse(from_occurrences) on the flag.

For example

#[clap(short = "v", long = "verbose")]
verbose: u64,

must be changed by

#[clap(short = "v", long = "verbose", parse(from_occurrences))]
verbose: u64,

This feature was surprising as shown in #30. Using the parse feature seems much more natural.

Change the signature of Structopt::from_clap to take its argument by reference by @TeXitoi

There was no reason to take the argument by value. Most of the StructOpt users will not be impacted by this change. If you are using StructOpt::from_clap, just add a & before the argument.

Fail if attributes are not used by @TeXitoi

StructOpt was quite fuzzy in its attribute parsing: it was only searching for interresting things, e. g. something like #[clap(foo(bar))] was accepted but not used. It now fails the compilation.

You should have nothing to do here. This breaking change may highlight some missuse that can be bugs.

In future versions, if there is cases that are not highlighed, they will be considerated as bugs, not breaking changes.

Use raw() wrapping instead of _raw suffixing by @TeXitoi

The syntax of raw attributes is changed to improve the syntax.

You have to change foo_raw = "bar", baz_raw = "foo" by raw(foo = "bar", baz = "foo") or raw(foo = "bar"), raw(baz = "foo").

New features

  • Add parse(from_occurrences) parser by @SergioBenitez
  • Support 1-uple enum variant as subcommand by @TeXitoi
  • structopt-derive crate is now an implementation detail, structopt reexport the custom derive macro by @TeXitoi
  • Add the StructOpt::from_iter method by @Kerollmops

Documentation

  • Improve doc by @bestouff
  • All the documentation is now on the structopt crate by @TeXitoi

v0.1.7 (2018-01-23)

  • Allow opting out of clap default features by @ski-csis

v0.1.6 (2017-11-25)

v0.1.5 (2017-11-14)

  • Fix a bug with optional subsubcommand and Enum by @TeXitoi

v0.1.4 (2017-11-09)

  • Implement custom string parser from either &str or &OsStr by @kennytm

v0.1.3 (2017-11-01)

v0.1.2 (2017-11-01)

  • Fix bugs #24 and #25 by @TeXitoi
  • Support of methods with something else that a string as argument thanks to _raw suffix by @Flakebi

v0.1.1 (2017-09-22)

  • Better formating of multiple authors by @killercup

v0.1.0 (2017-07-17)

v0.0.5 (2017-06-16)

  • Using doc comment to populate help by @killercup

v0.0.3 (2017-02-11)

  • First version with flags, arguments and options support by @TeXitoi