ethereum / solidity

Solidity, the Smart Contract Programming Language
https://soliditylang.org
GNU General Public License v3.0
23.35k stars 5.77k forks source link

[CLI] Separate control flow from error reporting in `CommandLineParser` #11731

Closed cameel closed 2 years ago

cameel commented 3 years ago

This is a continuation of the CLI refactor from #11518. Getting rid of exit() was suggested in the review.

Currently CommandLineParser uses the mechanism inherited from CommandLineInterface to report errors - it prints a message to the error stream and returns false.

Here's my proposal on how to refactor this:

1) Modify CommandLineInterface so that the return value from the parser only indicates whether it should continue processing (true) or immediately exit without error (false).

Midhun07 commented 3 years ago

Hi @cameel. I would like to work on this issue.

cameel commented 3 years ago

@Midhun07 This one is actually taken. @spiyer99 is working in it and has already submitted a PR (still work in progress though). I tried to assign him earlier to make this apparent but github won't let me - I think I can only do that if someone has commented in the issue.