feat(argv,derive): add compiled clause support - #1320
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
24d040a to
911cc4c
Compare
911cc4c to
20207e5
Compare
20207e5 to
e3f365e
Compare
e3f365e to
b79b9c2
Compare
b79b9c2 to
eb1cdf8
Compare
eb1cdf8 to
a86bd3f
Compare
a86bd3f to
ca197ee
Compare
ca197ee to
f2ed8d7
Compare
1304064 to
64a99e6
Compare
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes. Shadow comparisonParsing
|
64a99e6 to
e173603
Compare
e173603 to
22683bd
Compare
22683bd to
1e0e644
Compare
1e0e644 to
80ff8a9
Compare
80ff8a9 to
b3c69b6
Compare
b3c69b6 to
bf7076a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bf7076a. Configure here.
| block.push("\t},".to_string()); | ||
| block.push("},".to_string()); | ||
| lines.push(Line::Block(block)); | ||
| } |
There was a problem hiding this comment.
Go tables omit clause argument keys
High Severity
Clause arguments now receive sequential keys, but metadata and help_table still size and fill their slices as 1 + flags + args. Those keys therefore land past the table or in empty slots, so Lookup returns nil for clause args and for every later flag, argument, or subcommand. Required checks, choices, and help text silently disappear for generated Go CLIs that declare a clause.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit bf7076a. Configure here.


Summary
Stack
Test plan
AI-assisted — Tool: Codex; model: OpenAI/GPT-5; version: unavailable.
Note
Medium Risk
Touches core argv binding across Rust, Go, derive, and conformance; incorrect separator or reset logic could mis-parse multi-instance CLIs, but behavior is heavily corpus- and test-covered.
Overview
Adds repeatable clause parsing: commands can declare a separator-delimited positional group whose instances are preserved instead of overwriting earlier values.
The Rust argv parser gains
Command::clause,Event::ClauseSeparator, and routing through clause inner args (including separator handling after automaticdouble_dashand literal separators after--). Help, completions, spec emission, and usage lines now read positionals from the clause when present (usage shows repeatable pattern like{inner} [{separator} {inner}]…).usage derive supports
#[usage(clause, separator = "…")]onVec<T>(T: Args) with compile-time limits (one clause, no mixing with top-level args/subcommands). Conformance and the new corpus vectors expect aclausesmap; the reference and Go parser/spec lowering mirror the same behavior.usage diff treats adding, removing, or changing a clause separator as breaking.
Reviewed by Cursor Bugbot for commit bf7076a. Bugbot is set up for automated code reviews on this repo. Configure here.