ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.56k stars 3.22k forks source link

cannon: Fix custom --help for multicannon subcommands #12112

Closed Inphi closed 4 days ago

Inphi commented 4 days ago

The multicannon CLI interface needs to be backwards and forwards compatible with all cannon implementations. However, all commands currently require either a --input or --type to select the VM implementation. This means the user cannot get --help on a vm implementation without specifying either --input or --type. The workaround previously implemented was to have multicannon list the available VM implementations whenever the user invokes multicannon --help. This way the user can at least know what options are available when specifying --input/--type args. This patch fixes a bugs in --help handling.

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 74.94%. Comparing base (874c0e9) to head (e9629ff). Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
cannon/multicannon/load_elf.go 0.00% 2 Missing :warning:
cannon/multicannon/run.go 0.00% 1 Missing :warning:
cannon/multicannon/witness.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #12112 +/- ## =========================================== + Coverage 68.11% 74.94% +6.82% =========================================== Files 54 49 -5 Lines 4118 3652 -466 =========================================== - Hits 2805 2737 -68 + Misses 1135 743 -392 + Partials 178 172 -6 ``` | [Flag](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/12112/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism) | Coverage Δ | | |---|---|---| | [cannon-go-tests](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/12112/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism) | `74.94% <0.00%> (+6.82%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/12112?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism) | Coverage Δ | | |---|---|---| | [cannon/multicannon/run.go](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/12112?src=pr&el=tree&filepath=cannon%2Fmulticannon%2Frun.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism#diff-Y2Fubm9uL211bHRpY2Fubm9uL3J1bi5nbw==) | `0.00% <0.00%> (ø)` | | | [cannon/multicannon/witness.go](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/12112?src=pr&el=tree&filepath=cannon%2Fmulticannon%2Fwitness.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism#diff-Y2Fubm9uL211bHRpY2Fubm9uL3dpdG5lc3MuZ28=) | `0.00% <0.00%> (ø)` | | | [cannon/multicannon/load\_elf.go](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/12112?src=pr&el=tree&filepath=cannon%2Fmulticannon%2Fload_elf.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism#diff-Y2Fubm9uL211bHRpY2Fubm9uL2xvYWRfZWxmLmdv) | `0.00% <0.00%> (ø)` | | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/12112/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism)