feat: add description parameter to task args for --help output#957
Merged
thesayyn merged 2 commits intoaspect-build:mainfrom Mar 10, 2026
Merged
feat: add description parameter to task args for --help output#957thesayyn merged 2 commits intoaspect-build:mainfrom
thesayyn merged 2 commits intoaspect-build:mainfrom
Conversation
Allow .axl authors to provide human-readable descriptions for task arguments via `args.string(description = "...")` etc. The description is shown in `aspect <command> --help` output via Clap's `.help()`.
8291da8 to
9d2852e
Compare
thesayyn
approved these changes
Mar 10, 2026
Contributor
Author
|
@thesayyn Thanks. If I make another PR, I'll set up rustfmt first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tasks already support a top-level description field shown in --help, but individual task args have no way to describe what they do. This means aspect --help shows flag names, types, defaults, and required status but no human-readable explanation. For tasks with several flags, users have to read the .axl source to understand what each arg controls.
This adds an optional description parameter to all args.*() functions so .axl authors can write:
The description is passed through to Clap's .help() and appears in --help output next to the flag.
Changes are visible to end-users: yes
Task arguments now accept an optional description parameter. The description is displayed in aspect --help output.
Test plan
There do not appear to be tests for this in the repo, but the functionally was manually tested:
a. Add description = "..." to an arg in a .axl file
b. Run aspect --help
c. Verify the description appears next to the flag
d. Verify args without description still work as before (backward compatible)