Skip to content

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Feb 7, 2024

Previously, we aggressively errored out, which prevented the normal def complete logic from happening: reporting missing arguments, passing remaining tokens to Leftover, etc. This change makes it so that we just go through the normal code paths when combined short args fail to parse, making the error reporting more consistent with the rest of MainArgs and allowing tokens such as -foo to be passed to Leftover when possible

Covered by additional unit tests

@lefou lefou added this to the after 0.6.1 milestone Feb 9, 2024
@lihaoyi lihaoyi merged commit 1d04a6b into main Feb 9, 2024
@lihaoyi lihaoyi deleted the combined-args-leftover branch February 9, 2024 14:18
@lefou
Copy link
Member

lefou commented Feb 18, 2024

@lihaoyi A new release would be great.

@lihaoyi
Copy link
Member Author

lihaoyi commented Feb 19, 2024

Pushed a 0.6.2 tag

lihaoyi added a commit that referenced this pull request Sep 13, 2024
This was accidentally broken in
#102 and
#112, and wasn't covered by
tests. Noticed when trying to update Ammonite to the latest version of
MainArgs in com-lihaoyi/Ammonite#1549

Restored the special casing for tracking/handling incomplete arguments
and added some unit test cases
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