Skip to content

fix(Mandatory args): list missing cases#236

Merged
bartelink merged 18 commits intofsprojects:masterfrom
fpellet:fix-mandatory-msg
Mar 28, 2024
Merged

fix(Mandatory args): list missing cases#236
bartelink merged 18 commits intofsprojects:masterfrom
fpellet:fix-mandatory-msg

Conversation

@fpellet
Copy link
Copy Markdown
Contributor

@fpellet fpellet commented Mar 26, 2024

A regression has occurred in #127

Previously, if a case was missing, help was displayed for the subcommand and not for the main command. This was the same behaviour as when there was an unknown case.
This PR corrects this to restore the old behaviour.

At the same time, the error message when a case is missing has been improved. It used to display only the first missing case.
Now it displays all the missing cases.

@bartelink bartelink changed the title Fix error message if missing mandatory case fix(Mandatory args): list missing cases Mar 27, 2024
Copy link
Copy Markdown
Member

@bartelink bartelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for noticing and fixing - can you also add a mention to the release notes please (call it 6.2.3)

Comment thread src/Argu/UnionArgInfo.fs Outdated
Comment thread tests/Argu.Tests/Tests.fs Outdated
Comment thread tests/Argu.Tests/Tests.fs Outdated
Comment thread tests/Argu.Tests/Tests.fs Outdated
Comment thread tests/Argu.Tests/Tests.fs Outdated
Comment thread tests/Argu.Tests/Tests.fs Outdated
Comment thread src/Argu/Parsers/Cli.fs Outdated
@fpellet fpellet closed this Mar 27, 2024
@fpellet fpellet reopened this Mar 27, 2024
@fpellet
Copy link
Copy Markdown
Contributor Author

fpellet commented Mar 27, 2024

Thank you for noticing and fixing - can you also add a mention to the release notes please (call it 6.2.3)

I have update release note. Minor version because it changes the text of the error message, and display all missing cases

Comment thread tests/Argu.Tests/Tests.fs Outdated
Comment thread tests/Argu.Tests/Tests.fs Outdated
Comment thread tests/Argu.Tests/Tests.fs Outdated
Comment thread RELEASE_NOTES.md Outdated
Comment thread RELEASE_NOTES.md Outdated
Comment thread RELEASE_NOTES.md Outdated
fpellet and others added 4 commits March 27, 2024 17:18
@bartelink
Copy link
Copy Markdown
Member

Thanks for all the follow-ups and for bearing with all my pedantry.
I think there's one nit outstanding, but if you don't get to it in the next bit I'll merge and release later on.

@bartelink bartelink merged commit e3bc012 into fsprojects:master Mar 28, 2024
@bartelink
Copy link
Copy Markdown
Member

Released; thanks for another excellent contribution!

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.

2 participants