Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make combine short args that fail to parse go through normal leftover-token code paths #112

Merged
merged 1 commit into from
Feb 9, 2024

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
4 checks passed
@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