mozilla / grcov

Rust tool to collect and aggregate code coverage data for multiple source files
Mozilla Public License 2.0
1.19k stars 149 forks source link

Switch `structopt` for `clap` v3 #997

Closed CosmicHorrorDev closed 1 year ago

CosmicHorrorDev commented 1 year ago

This switches things back to clap now that the derive changes landed

The changes for LevelFilter are a little awkward due to the orphan rule. I couldn't find a good way to have clap parser to a LevelFilter while enumerating possible values. It's possible that I just missed something

I opted for going to switch to v3 instead of jumping all the way to v4 to minimize controversial changes since v4 involved a lot of changes to help messages that would likely leave more to debate. The (imo confusingly named) deprecated feature enables deprecation messages, so the transition to v4 should be pretty smooth anyways

Lastly I couldn't get the full test suite to pass on master to begin with (couldn't find any documentation for setup I need either). At the very least all of the tests that pass on master passed on this PR for me and all the tests that failed seemed to fail in the same way

lu-zero commented 1 year ago

did you forget to initialize the submodules?

marco-c commented 1 year ago

@CosmicHorrorDev it'd be great if you could also submit a PR for upgrading to clap v4.

CosmicHorrorDev commented 1 year ago

Sure! I'll work on that tomorrow :)