feat(parse): support ordered environment fallbacks - #1130
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 |
9154781 to
de64251
Compare
de64251 to
011986f
Compare
011986f to
57f2428
Compare
Instruction counts
1 benchmark(s) above the 1% gate: 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
|
57f2428 to
c2ca35e
Compare
c2ca35e to
03dff7f
Compare
3ddc9b5 to
89a1468
Compare
89a1468 to
f671e25
Compare
f671e25 to
36399f2
Compare
36399f2 to
ac65588
Compare
ac65588 to
fd31165
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 fd31165. Configure here.
fd31165 to
530e224
Compare
263a591 to
743a8a5
Compare
1cfe760 to
f888ab1
Compare
f888ab1 to
212d612
Compare
3713cf5 to
212d612
Compare
212d612 to
004d130
Compare
004d130 to
ad3ac78
Compare
ad3ac78 to
f6a2ed0
Compare
f6a2ed0 to
a6ea887
Compare
0c69757 to
4986403
Compare
4986403 to
ae16f8c
Compare

Summary
env_fallbackanddeprecated_envflag metadata to KDL and the typed deriveValidation
cargo clippy --workspace --all-features -- -D warningscargo test --workspace --all-features(cd go && go test ./...)This PR was generated by Codex.
Note
Medium Risk
Changes environment-variable fill order in Rust and Go parsers, which can change which value a CLI binds when multiple vars are set. Help and spec round-trip are updated in lockstep.
Overview
Adds ordered environment fallbacks and deprecated env aliases on flags and positionals. After argv, parsers try the canonical
env, thenenv_fallbackin declaration order, thendeprecated_env, then defaults.The lists are first-class in KDL (
env_fallback/deprecated_envnodes), the typed derive (env_fallback(...),deprecated_env(...)), usage-lib, generated Go tables, and help/docs (including man pages).hide_envstill suppresses all of those names.Closes the PLAN item for clap#5447 / clap#5925, with conformance covering flags, positionals, flatten/next-line help, and KDL round-trip.
Reviewed by Cursor Bugbot for commit ae16f8c. Bugbot is set up for automated code reviews on this repo. Configure here.