Skip to content

Releases: kongaskristjan/fire-hpp

v1.0

Choose a tag to compare

@kongaskristjan kongaskristjan released this 15 Sep 15:55

New features and improvements

  • Added utilities for getting raw arguments, and added the option to allow unused parameters that could be parsed separately by the user
  • Added argument constraints
  • Utilities for printing help in fired_main() and properly raising errors
  • Improved error messages
  • Improved documentation of internals, including a write-up of the library's algorithm
  • Minor fixes

The library is finally stable! It's been a long journey.

v0.2

Choose a tag to compare

@kongaskristjan kongaskristjan released this 07 Nov 19:05

v0.2 is mostly a matured version of v0.1, in a sense that not many new features were added, however existing features were improved. In summary, a lot of breaking changes and a lot of internal structural changes. The rationale is to make most of the breaking changes early in development, so that new features can be added to a "more final" version of the library.

Release notes

Breaking changes:

  • Include fire as <fire-hpp/fire.hpp> not <fire.hpp>.
  • Hyphens are also written when specifying argument names. So instead of fire::arg("x") and fire::arg("long-name") you write fire::arg("-x") and fire::arg("--long-name").
  • Name/position and description are now both the first argument. Eg. now it's fire::arg({name, description}, default value) instead of fire::arg(name, description, default value).
  • Variadic arguments are now specified as fire::arg(fire::variadic()) instead of fire::arg::vector().
  • No more FIRE_NO_SPACE_ASSIGNMENT(...).

New library features:

  • FIRE(...) now works with positional/variadic argument, previously needed FIRE_NO_SPACE_ASSIGNMENT(...). This was a HUGE change internally, had to implement a totally new argument introspection algorithm.
  • fire.hpp now compiles without exception support, but you need to use FIRE_NO_EXCEPTIONS(...) instead of FIRE(...), which has limitations.
  • Program descriptions.
  • Positional arguments can be supplied with custom names.

Improvements:

  • In program -- --some-text --some-text is interpreted as positional, per convention.
  • Much cleaner help messages. Clarified a few error messages too.
  • Accept arguments in a manner similar to make -j8 <=> make -j 8 if unambiguous.
  • Misc bug fixes.

Integration

v0.1

Choose a tag to compare

@kongaskristjan kongaskristjan released this 03 Jul 21:42

Features:

  • Flags, named, positional, vector parameters
  • Optional parameters, default values
  • Conversions to arithmetic types
  • Parameter descriptions
  • All of this using just function signatures