Skip to content

Releases: bfgroup/Lyra

Lyra 1.7.0

07 Aug 15:32
Compare
Choose a tag to compare

It's been a rather long time since a release. But hopefully releases will be more frequent from now on because.. Instead of waiting for a "large enough" accumulation of changes in a release the plan going forward is to have at least one release a year.

In this release there are a variety of bug fixes and adjustments. Although most are small they do add up to a good chunk of new stability. There are also some enhancements as requested that make for more flexibility in output and parsing modes.

Changes:

  • New: Make printing help text configurable to make it possible to avoid using iostreams for output.
    -- René Ferdinand Rivera Morell
  • New: Implements a new brief_help mode for a command that only prints out the command name and description.
    -- René Ferdinand Rivera Morell
  • New: Adds printing default/initial value for options in help output.
    -- René Ferdinand Rivera Morell
  • New: Add relaxed parsing to support "bag of options" style command lines.
    -- René Ferdinand Rivera Morell
  • New: Add ordering/sorting of printed option details specified in the option_style::options_print_order value.
    -- René Ferdinand Rivera Morell
  • New: Improve output readability by indenting sub-commands.
    -- René Ferdinand Rivera Morell
  • New: Add lyra::arguments::require to specify limits on how many successful sub-parsers are required for parsing.
    -- René Ferdinand Rivera Morell
  • Fix operator| loosing group subtype causing invalid parsing.
    -- René Ferdinand Rivera Morell
  • Fix crash when no arguments are given to the parsing.
    -- René Ferdinand Rivera Morell
  • Fix crash when changing settings of a command and adding subsequent arguments.
    -- René Ferdinand Rivera Morell
  • Fix short option values being ignored in the case where the value separator is past the short option and in the value itself.
    -- René Ferdinand Rivera Morell
  • Fix choice limited args from erroring early.
    -- René Ferdinand Rivera Morell
  • Refactored the way help is printed to allow individual parsers to customize their output through the printer object.
    -- René Ferdinand Rivera Morell
  • Fix zero-as-null pointer conversion warnings.
    -- Hermann von Kleist
  • Fix some unclear error messages when parsing optional arguments.
    -- René Ferdinand Rivera Morell
  • Fix parsing with mix of required and optional arguments.
    -- René Ferdinand Rivera Morell
  • Fix passing move-only lambdas to opt and arg parsers.
    -- René Ferdinand Rivera Morell
  • Fix incorrect interpretation of single character literal strings to the choice(..) function.
    -- René Ferdinand Rivera Morell
  • Fix ignored short circuit error results returned from user callbacks. This now, correctly, allows for custom error messages from user callbacks when parsing or checking arguments.
    -- René Ferdinand Rivera Morell
  • Tested with Visual Studio 2022, MinGW-64 (gcc 8.1.0), Linux (clang 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21; gcc 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), Xcode (14.3.1, 15.4, 16.4), on Azure Pipelines; and with VS 2015, VS 2017, VS 2019, VS 2022, MinGW-64 (gcc 6.3, 7.3, 8.1) on AppVeyor.

Lyra 1.6.1

07 Nov 22:31
Compare
Choose a tag to compare

Only bug fixes for compile warnings and a pair of bad argument names. Changes:

  • Fix variable name shadowing warnings.
    -- Sadie Powell
  • Fix command::operator|= function signature.
    -- Henrik Gaßmann

Lyra 1.6

10 Dec 19:32
Compare
Choose a tag to compare

Even though most of the changes for this release are to fix various reported
bug fixes, fixing those bugs has meant dealing with some long standing
internal parser inconsistencies. While I try to not break backwards
compatibility, I likely can't catch all of the corner cases people have
discovered.

WARNING: This release has some internal cleanup of the parser result types. It
also has an externally visible change to the parse function result type. It
renames the errorMessage() function to message(). The errorMessage()
function is marked deprecated and will be removed in a future release.

Changes:

  • New: Add lyra::option_style type to better customize the syntax of
    options allowed. This replaces the "old" lyra::parser_customization as a
    better way. The lyra::parser_customization is now deprecated, and will
    be removed at some future release.
    -- René Ferdinand Rivera Morell
  • New: Add example to show how to count flags with cardinality greater than
    one (1). Shows how to handle increasing verbosity with -vvvv.
    -- René Ferdinand Rivera Morell
  • New: Add capability to control the cardinality of argument groups.
    -- René Ferdinand Rivera Morell
  • New: Allow setting hint after construction of lyra::bound_parser.
    -- Max Ferger
  • Fix virtual overload hiding of parse method.
    -- René Ferdinand Rivera Morell
  • Fix previously removed error for when expected option specifications
    do not have the required - prefix.
    -- René Ferdinand Rivera Morell
  • Fix inconsistencies in parsing arguments in a group followed by other
    arguments. (issue #49)
    -- René Ferdinand Rivera Morell
  • Fix incorrectly accepting negative values for unsigned integer arguments.
    The argument value conversion now checks the input for acceptable digits
    in the input before attempting to parse it.
    -- René Ferdinand Rivera Morell
  • Fix sub-command arguments being ignored even when they are marked as
    required.
    -- René Ferdinand Rivera Morell
  • Fix assigned values for flag options (--flag=no) being ignore. They now
    cause an error when specified.
    -- René Ferdinand Rivera Morell
  • Fix choices being allowed for for flag options, but ignored. Specifying
    choices on flag options now signal an error.
    -- René Ferdinand Rivera Morell
  • Tested with Visual Studio 2019, VS 2022, MinGW-64 (gcc 8.1.0), Linux ( clang 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13; gcc 5, 6, 7, 8, 9, 10, 11), Xcode (11.2.1, 11.3.1, 11.4.1, 11.5, 11.6, 11.7, 12.0.1, 12.2, 12.3, 12.4, 13.0), on Azure Pipelines; and with VS 2015, VS 2017, MinGW-64 (gcc 6.3, 7.3) on AppVeyor.

Lyra 1.5.1

30 Aug 03:17
Compare
Choose a tag to compare

Minor change to bring back the missing option argument hints from the usage help output.

Lyra 1.5

27 Aug 13:37
Compare
Choose a tag to compare

This release has some big changes in easy of use and functionality. There are
now alternate interfaces for specifying and fetching arguments. Also the help
output is now more compact and clearer. There is also new support for
sub-commands.

WARNING: The cli_parser type was renamed to cli. Both the cli_parser type
and the lyra/cli_parser.hpp header are deprecated and will be removed in a
future release.

WARNING: Changed the install CMake target from BFG::Lyra to bfg::lyra.

Changes:

  • New: Main encapsulation of common use case of help option handling. With shorthand specification of arguments. -- René Ferdinand Rivera Morell
  • New: Ability to specify argument values, with default, without specifying a local external to the parser variable. Making it easier to specify command lines. The values can be retrieved from the cli as a map from argument names to the value. -- René Ferdinand Rivera Morell
  • New: Support construction of lyra::args from iterators for cases where the arguments come from some existing container. -- René Ferdinand Rivera Morell
  • New: Add Cmake install support. -- Jayesh Vinay Badwaik
  • New: Command argument to make it easy to specify sub-commands. -- René Ferdinand Rivera Morell
  • New: Alternative sequential argument parsing mode. -- René Ferdinand Rivera Morell
  • New: Grouped arguments to specify and handle sub-command parsers. -- René Ferdinand Rivera Morell
  • New: literal parser to directly match an argument. -- René Ferdinand Rivera Morell
  • Fix missing hint text for optional, lyra::arg, arguments. -- René Ferdinand Rivera Morell
  • Bring back some cleaner and compact formatting of the help text. -- René Ferdinand Rivera Morell
  • Tested with Visual Studio 2017, VS 2019, MinGW-64 (gcc 8.1.0), Linux (clang 3.9, 4, 5, 6, 7, 8, 9, 10; gcc 4.9, 5, 6, 7, 8, 9, 10), Xcode ( 11.1, 11.2.1, 11.3.1, 11.4.1, 11.5, 11.6), on Azure Pipelines; and with VS 2015, MinGW-64 (gcc 6.3, 7.3) on AppVeyor.

Lyra 1.4

24 May 03:13
Compare
Choose a tag to compare

Another round of small fixes and one new feature. Changes:

  • New Allow passing option value choices as an array. -- Rene Rivera
  • Fix sample code in README to be correctly namespaced. -- Jayesh Badwaik
  • Fix commands example to actually show help when specified. -- Shreyas Potnis
  • Tested with Visual Studio 2017, VS 2019, MinGW-64 (gcc 8.1.0), Linux (clang 3.8, 3.9, 4, 5, 6, 7, 8, 9, 10; gcc 4.8, 4.9, 5, 6, 7, 8, 9, 10), Xcode (10.1, 10.2.1, 10.3, 11.1, 11.2.1, 11.3.1, 11.4), on Azure Pipelines; and with VS 2015, MinGW-64 (gcc 6.3, 7.3) on AppVeyor.

Lyra 1.3

19 Jan 03:53
Compare
Choose a tag to compare

A few small new features, bug fixes, and continued cleanup on the road to reducing memory allocations. Changes this time around:

  • New: Accept -o2 style option+value arguments. -- Rene Rivera
  • New: Accept -abc option name spelling as shorthand for -a, -b, -c. -- Rene Rivera
  • Fixed inconsistent handling of option values that look like options, like negative numbers. -- Rene Rivera
  • Rewrote argument token parsing for clarity, to avoid extra token buffer allocation, and to allow for more option & value variations. -- Rene Rivera
  • Fixed allowing junk extra characters after a non-string option value. -- Rene Rivera
  • Support specifying a single value for choices of an argument. -- Rene Rivera
  • Fix various problems with the commands example program. Also now the examples for the documentation are unit tested along with the regular unit tests. -- Rene Rivera
  • Tested with Visual Studio 2015, VS 2017, VS 2019, MinGW-64 (gcc 8.1), Linux (clang 3.5, 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8, 9; gcc 4.8, 4.9, 5, 6, 7, 8, 9), Xcode (9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 9.4, 9.4.1, 10.0, 10.1, 10.2, 10.2.1, 10.3, 11.0, 11.1, 11.2, 11.2.1), on Azure Pipelines.

Lyra 1.2

25 Nov 03:17
Compare
Choose a tag to compare

Concentrated on new features. Many of them from old Clara requests. But also continued internal cleanup of code. The changes are:

  • New: One can now accept 1-or-more on bound container arguments by only
    specifying required() on such arguments. -- Rene Rivera
  • New: One can now define a description text to display as general command
    information with the help::description method. -- Rene Rivera
  • New: Add named methods as alternates for operators to add and specify
    arguments. They follow the familiar Python argparse nomenclature. -- Rene Rivera
  • New: Single header file alternative version of the library. For those that
    need or want such a thing. -- Rene Rivera
  • Improve help for arguments that specify a cardinality. -- Rene Rivera
  • Addition of more complicated use cases to demonstrate flexibility of library. -- Rene Rivera
  • Continued internal clean up of code for stability and easier future
    enhancements. -- Rene Rivera

As mentioned above there is now a single header version of the library. It's included in the release archive as data/single_include/lyra/lyra.hpp. You can also get it directly from here.

Lyra 1.1

29 Sep 02:59
Compare
Choose a tag to compare

This is mostly a maintenance release. Which means fixing bugs, more documentation changes, and more tested compilers. Thanks to people for pointing out problems. And, thanks to Matt Godbolt's suggestion, there is one new feature:

  • New: Add direct Meson Build use support.
    -- Rémi Gastaldi
  • New: Define argument value choices() as either a fixed set or checked
    by a custom lambda function. -- Rene Rivera
  • Fix being able to parse straight from args outside of cli_parser. Which
    resulted in misleading parsing behavior. Rene Rivera
  • Fix use of cardinality() to correctly constrain bounded cardinality
    ranges like [0,n], [n,m], [n,n], and [0,0] (unbounded).
    Rene Rivera
  • Fix use of required() arguments such that the parse errors if they are
    absent. -- girstsf
  • Remove uses of assert macro to avoid internal aborts and make it easier
    to use as a library. -- Rene Rivera
  • Many documentation improvements. -- Rene Rivera
  • Tested with
    Visual Studio 2015, VS 2017, VS 2019,
    MinGW-64 (gcc 8.1),
    Linux (clang 3.5, 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8, 9; gcc 4.8, 4.9, 5, 6, 7, 8, 9),
    Xcode (9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 9.4, 9.4.1, 10.0, 10.1, 10.2, 10.2.1, 10.3, 11.0),
    on Azure Pipelines.