chore: update clap dependency to 4.1#1198
Conversation
|
Thanks @cardoso, appreciate how this brings the Glancing through the changes, all looks well; however, the e2e tests are catching similar breaking CLI behavior as seen in #1053 (review). Do you think it should be fairly straightforward to address these (eg retain current CLI behavior) and still land the dependency updates? |
|
It's not possible with clap 4. It really wants unknown args to be either after -- or next to each outer, so it assumes anything after an unknown arg is also unknown. I'm pushing a sample workaround to see what the tests say... |
ce822aa to
e922a1a
Compare
Signed-off-by: Matheus Cardoso <matheus@cardo.so>
|
I will close this one as blocked by clap-rs/clap#1404 or alternatively, once the breaking change can be made to the to the more conventional I think I reached a solution at some point, but it involved refactoring a lot of code that's receiving constant changes. Suffice to say... |
|
Thank you @cardoso for all your effort on this - I'm sorry it didn't work out. This definitely seems to be a regression between clap 3 and clap 4, but looking at that issue it seems to be 'by design.' Frustrating! |

I kept changes to a minimum this time, so there's redundant parameters or with better alternatives in v4, but those should be easy to improve as needed. The display order in help was also kept the same by overriding the new default in each Subcommand.