Improved the Dispatcher to work with default global args and support extra ones in the future (CRAFT-565).
Metadata
Current evaluation
Merged PR #563 as 6c9a6e03 (head 6e26aa82), improving Dispatcher global-argument handling, adding tests, and relocating help logic for craft-cli extraction.
Resolution: closed resolved
Reason: PR #563 was approved and merged into the mainline. It implemented Dispatcher support for default global arguments and added tests for future extra global arguments.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This is a small improvement (the dispatcher supporting the "extra global args", for which tests were added) and two groups of code moved around (no tests changes needed, as there is no functionality changes really). All part of the plan of splitting this functionality into `craft-cli` lib.
The code moved around or changed is:
- better names! `_Global` transformed into `GlobalArgument` as this will be part of the lib's public API, and `GLOBAL_ARGS` transformed into `_DEFAULT_GLOBAL_ARGS` which will be part of the internal lib's functionality
- moved the functionality of three help-related functions to be part of the Dispatcher (as they need to access/use the "final global args")
Note that the "project dir" global arg is still "default", but will be moved to be "extra" when the Dispatcher is isolated from the configuration loading.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #563 as 6c9a6e03 (head 6e26aa82), improving Dispatcher global-argument handling, adding tests, and relocating help logic for craft-cli extraction. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/charmcraft#563 via 6e26aa82, improving Dispatcher global-argument handling, adding tests, and moving help logic ahead of craft-cli extraction. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged Dispatcher improvements in charmcraft#563 (implementation 6e26aa82, merge 6c9a6e03), adding default global-argument support, tests, and refactors ahead of the craft-cli split. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged Dispatcher improvements for default global arguments and future extras. Refactored naming, relocated help functions, and prepared code for craft-cli extraction. Approved and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged Dispatcher improvements to support default and future extra global arguments. Refactored naming for public and internal APIs, relocated help functions, and prepared code for extraction into the craft-cli library. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/charmcraft#564
(confidence 96%)
Follow-up PR #564 moved configuration loading and project-directory handling outside Dispatcher.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #106 refactor: drop _Dispatcher | craft-application | merged | Merged PR #106 as commit 3cf5c8a4, removing the internal _Dispatcher and requiring craft-cli 2.3.0 for Dispatcher.parsed_args(). | |
| #46 New functionality from charmcraft (CRAFT-706). | craft-cli | merged | Merged CRAFT-706 functionality from Charmcraft into craft-cli, including dispatcher and help-text improvements, via canonical/craft-cli#46 (4b190c5). | |
| #58 Support for a default command in Dispatcher (CRAFT-760). | craft-cli | merged | Added and documented Dispatcher support for a default command under CRAFT-760; approved PR #58 merged into main in commit 7bc0567. |