feat: add Apply method to CmdArgParser#7204
Merged
BorysTheDev merged 3 commits intomainfrom Apr 22, 2026
Merged
Conversation
🤖 Augment PR SummarySummary: This PR expands Changes:
Technical Notes: 🤖 Was this summary useful? React with 👍 or 👎 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends facade::CmdArgParser with bulk option parsing helpers (Apply / ApplyOrSkip) and supporting option descriptors (Tag, Exist), and updates list command parsing to use the new API.
Changes:
- Add
CmdArgParser::Apply/ApplyOrSkipplusTag/Existoption helpers incmd_arg_parser.h. - Extend parsing to support
std::optional<T>targets viaConvert(). - Refactor
LPOS,LMPOP, andBLMPOPoption parsing to use the new helpers, and add unit tests for the new APIs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/server/list_family.cc | Switches list command option parsing to the new Check(..., &out) and ApplyOrSkip(Tag(...)) style. |
| src/facade/cmd_arg_parser_test.cc | Adds new unit tests for Apply, ApplyOrSkip, lambda-tag handlers, and optional targets. |
| src/facade/cmd_arg_parser.h | Introduces Apply / ApplyOrSkip, Tag/Exist option types, and optional conversion support. |
dranikpg
previously approved these changes
Apr 22, 2026
vyavdoshenko
previously approved these changes
Apr 22, 2026
Contributor
Author
|
augment review |
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.
Summary: This PR extends facade::CmdArgParser with a bulk option-parsing API to simplify command argument handling.
Changes:
Technical Notes: Apply stops on the first unmatched token (caller may Finalize() for strictness), while ApplyOrSkip consumes unknown tokens to allow permissive parsing.