Skip to content

Upgrade bundled CLI11 to v2.6.2 and adapt integrations (validators, callbacks, extras, formatter)#93

Open
VolkerChristian wants to merge 1 commit into
masterfrom
codex/analyze-changes-for-cli11-integration
Open

Upgrade bundled CLI11 to v2.6.2 and adapt integrations (validators, callbacks, extras, formatter)#93
VolkerChristian wants to merge 1 commit into
masterfrom
codex/analyze-changes-for-cli11-integration

Conversation

@VolkerChristian
Copy link
Copy Markdown
Member

Motivation

  • Bring the in-tree CLI11 copy up to v2.6.2 to pick up bugfixes and new features and align the project with the newer API and behavior.
  • Replace and simplify the previous custom formatter implementation and adapt the CLI integration to newer validator/callback/extras semantics.
  • Add more robust handling for separators, RTTI detection, and more granular callback ordering to support richer subcommand/help behaviors.

Description

  • Updated bundled header: bump CLI11 version macros to 2.6.2 and update copyright year.
  • Introduced new feature flags and helpers: CLI11_HAS_RTTI, CLI11_MODULE_INLINE, get_group_separators(), and several small utility changes (e.g. binary_escape_string(force), process_quoted_string(...) overload).
  • Validator and transform refactor: validators are now stored as shared_ptr<Validator>; added overloads to accept shared validators, transforms and function-based validators; reworked Validator combination operators and description merging.
  • Callback orchestration: added CallbackPriority enum and phased _process_callbacks(...) to control ordering of callbacks and help/version triggers; updated help/version/help-all flags to use first-priority callbacks.
  • Extras/config handling: replaced boolean allow_extras_ with ExtrasMode and allow_config_extras_ with ConfigExtrasMode, added PrefixCommandMode and improved _move_to_missing/extras handling and capture logic.
  • Option and parsing improvements: added callback_priority to Option/OptionDefaults, support for non-standard short names, improved positional/parse fallthrough and prefix-matching support, refinements to result storage and lexical conversion handling.
  • File/path validators and config parsing: added ExistingFile/Directory/Path/Nonexistent validators, split_program_name, check_path and related fixes for filesystem vs stat implementations.
  • Formatter removal and CMake changes: removed the project-specific Formatter.h/Formatter.cpp and related usages, updated CMakeLists.txt to drop those sources and headers; adjusted code to use CLI11 built-in formatter behavior.
  • SubCommand changes: adapted SubCommand to new CLI API (help flags, callback priorities), added requireCallback storage and runRequireCallbacks() integration invoked from config parsing flow.
  • Various API and internal cleanups: enum underlying types, many small logic fixes (e.g. newline handling, joining, escaping, option naming and joining behavior) across the header and calling code.

Testing

  • Project built with CMake (reconfigured to drop removed formatter sources) and compiled successfully (utils target and overall project build completed).
  • Ran project's automated unit/integration tests (test suite) after the change and observed the test run completed without failures.
  • Executed core command-line flows exercised by SubCommand/config parsing paths (help/version, config write/read, flag parsing) to validate behavior; observed expected help/version outputs and config handling.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant