-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: need to capture all scripting args when script arg is detected #12422
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @philwalk. Can we add regression tests for the spotted problems?
|
…alk/dotty into fix-scripting-args-capture
Two tests are now added to verify that script arguments are preserved, even when they collide with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @philwalk 🎉
Could you please rebase against master (instead of merge master into the PR)?
Ok. I'm not a I assume the requirement is that in the future, I do a Is there anything I still need to do here for this PR? If so, I might need to create a new PR for these changes. I notice the |
Yes, using rebase will avoid the
Thanks, I don't know that |
I notice |
I tried to rebase but there are merge requirements that I'm not qualified to resolve, so I think I should close this PR and create another with the changes from this PR. |
I will create a new pull request with identical changes in the same 4 files: compiler/test-resources/scripting/showArgs.sc
compiler/test/dotty/tools/scripting/BashScriptsTests.scala
dist/bin/scala
dist/bin/scalac |
this is superceded by #12467 |
This fixes 2 issues:
scripting_args
toscript_args
An example of the 2nd issue would be if a script expects arguments
-script
, '-repl, '-run
, etc.Here's a script that prints all arguments, and what it should print.
Here's the same script called via
scalac -script
: