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

Better handling of "--" #49

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Better handling of "--" #49

merged 1 commit into from
Jan 6, 2025

Conversation

cgay
Copy link
Member

@cgay cgay commented Jan 5, 2025

This is the simplest fix I could see for the second part ("Also, and more importantly...") of #47 ... simply stuff everything after "--" into a new unconsumed-arguments slot in the parser.

While technically this creates a backward incompatibility, the old code resulted in all the arguments being added to the final option's value list in reverse order and it is highly unlikely that anyone is depending on that broken behavior.

(This should be enough to allow me to make progress on the deft test command, in which I want to be able to pass extra args to testworks with deft test --build --all -- ...testworks-options....)

This is the simplest fix I could see for the second part ("Also, and more
importantly...") of dylan-lang#47 ... simply stuff everything after "--" into a new
`unconsumed-arguments` slot in the parser.

While technically this creates a backward incompatibility, the old code resulted in all
the arguments being added to the final option's value list **in reverse order** and it is
highly unlikely that anyone is depending on that broken behavior.
@cgay cgay merged commit 28a1fdd into dylan-lang:master Jan 6, 2025
1 check passed
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