Skip to content

The handler should always return an integer#2092

Merged
adamsitnik merged 4 commits intodotnet:mainfrom
adamsitnik:alwaysReturnAnInt
Mar 15, 2023
Merged

The handler should always return an integer#2092
adamsitnik merged 4 commits intodotnet:mainfrom
adamsitnik:alwaysReturnAnInt

Conversation

@adamsitnik
Copy link
Copy Markdown
Member

Makes progress towards #2071 and meeting BCL requirements

@adamsitnik
Copy link
Copy Markdown
Member Author

@jonsequitur Based on our offline discussion yesterday I know that:

  • forcing the users to always return an exit code from handler might be verbose, but on the other hand there is no magic (so far invoke/invokeasync were returning integer, while handlers were returning void) which aligns well with the BCL guidelines
  • the removal of InvocationResult should be seen as "we don't have a good proposal now, so we are removing it until we have one" rather than "everything will always return an int"

Since I want to introduce CliAction today and replace ICommandHandler I am going to merge this PR right now to avoid massive conflict.

@adamsitnik adamsitnik merged commit e10eec6 into dotnet:main Mar 15, 2023
@adamsitnik adamsitnik deleted the alwaysReturnAnInt branch March 15, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant