Skip to content

v2.7.0

Latest

Choose a tag to compare

@github-actions github-actions released this 12 Aug 20:09
· 23 commits to main since this release
v2.7.0
2d87056

This version adds a FileSize validator, a PositionalOnly prefix command
mode, and more control over config file generation. It also contains a large set
of bug fixes from a systematic audit of the parsing, config, help formatting,
string handling, and type conversion code, along with performance improvements
that remove unnecessary copies in hot paths.

Added

  • Added a FileSize validator to check minimum and maximum file sizes.
    #1305
  • Added PrefixCommandMode::PositionalOnly, which restores the pre-2.6.2 prefix
    command behavior as an opt-in mode: only a positional argument or the --
    separator triggers prefix mode, and unrecognized options are collected as
    extras. #1382
  • Added an option to write only the active subcommand defaults when generating a
    config file. #1314

Changed

  • Improved performance by removing unnecessary string and container copies in
    parsing and validator hot paths. #1368
  • Improved the performance of string splitting by replacing a stringstream
    with a find-based loop. #1396
  • Sorted the excludes and needs sets by name for stable help output.
    #1308
  • Removed en_US.UTF-8 from the unicode locale fallback list. #1312
  • Modernization and portability fixes: added missing standard includes, exported
    CLI::Number from the C++20 module, and cleaned up the warning lists.
    #1367
  • Aligned the Meson build with wrapdb policy by removing disable_auto_if for
    subprojects. #1349

Fixed

  • Fixed require_subcommand maximum enforcement for dot notation and for
    disabled fallthrough, dot-notation subcommands with Windows-style prefixes,
    get_options const/non-const consistency, and a crash when parsing with
    argc == 0. #1363, #1384
  • Fixed missing symbol export from the precompiled shared library on macOS.
    #1387
  • Fixed double indentation of nested option groups in help output. #1371,
    #1379
  • Fixed config reading and writing bugs: section headers with trailing comments,
    one-line multiline comments, embedded delimiters with the Join policy, and
    multiline values for indented keys. #1369, #1361
  • Fixed help formatting issues: hidden positionals appearing in the usage line,
    long subcommand names running into their descriptions, and ExtrasError
    reporting the wrong error name. #1369
  • Fixed ignore_case and ignore_underscore so both apply when used together.
    #1358
  • Fixed string handling edge cases in split_up, remove_quotes,
    append_codepoint, and escape_detect. #1364
  • Fixed type conversion edge cases: negative input to unsigned types,
    whitespace-only floating point input, containers of pairs with an odd element
    count, large integer sums, and the Join policy with default values.
    #1362
  • Fixed stale processed values being returned after Option::clear(). #1360
  • Fixed out-of-bounds reads in the non-codecvt narrow/widen conversion paths
    used under C++26. #1359
  • Fixed infinite recursion on subcommand option groups with fallthrough enabled.
    #1316
  • Fixed empty strings given to wrapper types such as std::optional to
    consistently produce a default-constructed value. #1340
  • Fixed CLI::ExistingFile to reject an empty filename with a clear error.
    #1351
  • Fixed an empty description on a modified Transformer. #1345
  • Fixed unsigned wraparound in split_program_name for command lines without
    spaces. #1339
  • Fixed FileOnDefaultPath with an empty default path, and PositiveNumber
    rejecting subnormal values. #1366
  • Fixed compilation with libc++/clang in C++26 mode. #1326
  • Fixed the case of the shell32 library name in CMake. #1347
  • Removed the static keyword from the precompiled library definition in CMake.
    #1304

Documentation

  • Clarified the behavior of the prefix_command overloads. #1310
  • Documented the Catch2 dependency for the test build. #1342
  • Corrected documentation errors, including the AsSizeValue example, the
    App::required() doc, and validator comments. #1304, #1366
  • Modernized some documentation. #1336
  • Moved the tutorial book into the Doxygen documentation, modernized the HTML
    output with doxygen-awesome-css, and reorganized the sidebar navigation.
    #1390, #1392, #1397, #1398
  • Corrected errors found in a documentation review. #1394
  • Split the documentation into Guide and Examples sections and filled gaps in
    the guide. #1400

Internal

  • Added a dev CMake preset and workflow for faster local iteration using the
    precompiled library and ccache. #1387
  • Added a CUDA test for the single-header build. #1381
  • Refactored the duplicated parse-completion pipeline and removed dead code.
    #1365
  • Moved static std::string reference initializers to helper functions.
    #1335
  • Routed formatter label fallback through an internal helper as a step toward
    internationalization support. #1320
  • Cleaned up the CMake logic for finding Catch2 and Boost, and corrected the
    example test regular expressions. #1325, #1322
  • Reorganized the GitHub workflows and reduced CI build times. #1323,
    #1387
  • Added C++26 CI coverage (GCC, and clang with modules), and made codecov wait
    for all coverage uploads. #1388, #1391
  • Tidied the configuration files in the root directory. #1393
  • Attached the source packages to tagged releases, wrote the release notes from
    the changelog, and added a CI check for a changelog entry on every build.
    #1401, #1402, #1403