Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port to clap 4, drop custom derive (#1142)
Move the CLI over to clap-4.4.6, drop `EdbClap` and use clap's derive instead. Custom derive allowed is to implement various hacks and logic in argument propagation and annotation, but the cost of maintaining what is essentially an old fork of `clap::_derive` is quite high and stands in the way of easy `clap` upgrades and the ability to use its newer features. Fortunately, I've been able to find ways to achieve the same argument propagation behavior with normal `global` args and a little bit of hackery at app initialization, so instead of doing #[edb(inherit(CloudOptions))] command or subcommand you should now do #[command(flatten)] pub cloud_opts: CloudOptions in the parent command of where you want to begin propagation. Though this is slightly more verbose (the current derive is a bit more magical about propagation), this approach has the benefit of making the options available closer to the actual subcommand as opposed to passing the root `Options` all the way through, but I've left that cleanup for later.
- Loading branch information