-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix #12318: Support options to repl #12370
Conversation
Some things I found while manually verifying each option in the The
If a script name is provided, the error disappears, so maybe a difference between the Also, scripts should immediately capture all remaining arguments as soon as the target_script is initialized ( |
I believe this has been "broken" for quite a long time, I have been using It would be nice if this were fixed such that |
@liufengyun Got your request; I'll have a look. |
Another existing issue with The problem can be illustrated with a Windows batch file for launching a REPL session: @echo off
set SCALA_HOME="c:/opt/scala3"
set CP="%SCALA_HOME%/lib/scala-library-2.13.5.jar;%SCALA_HOME%/lib/scala3-library_3-3.0.1-RC1-bin-SNAPSHOT.jar;%SCALA_HOME%/lib/scala-asm-9.1.0-scala-1.jar;%SCALA_HOME%/lib/compiler-interface-1.3.5.jar;%SCALA_HOME%/lib/scala3-interfaces-3.0.1-RC1-bin-SNAPSHOT.jar;%SCALA_HOME%/lib/scala3-compiler_3-3.0.1-RC1-bin-SNAPSHOT.jar;%SCALA_HOME%/lib/tasty-core_3-3.0.1-RC1-bin-SNAPSHOT.jar;%SCALA_HOME%/lib/scala3-staging_3-3.0.1-RC1-bin-SNAPSHOT.jar;%SCALA_HOME%/lib/scala3-tasty-inspector_3-3.0.1-RC1-bin-SNAPSHOT.jar;%SCALA_HOME%/lib/jline-reader-3.19.0.jar;%SCALA_HOME%/lib/jline-terminal-3.19.0.jar;%SCALA_HOME%/lib/jline-terminal-jna-3.19.0.jar;%SCALA_HOME%/lib/jna-5.3.1.jar"
C:/opt/jdk/bin/java.exe -Xmx768m -Xms768m -classpath %CP% -Dscala.usejavacp=true dotty.tools.repl.Main %* When launched from a But if C:\opt\ue>s0.bat
←[90m~←[0m←[K ←[?2004h←[34mscala> ←[0m:q
:q
←[?2004lC:\opt\ue> The fix is to unset PWD before calls to "$JAVACMD", in This garbled prompt appears in bash sessions as well, with the same fix. |
Thanks for all your input @philwalk @griggt @michelou . I think we can make For the Windows issue, could you push a fix in another PR @philwalk ? BTW, it seems it will help a lot if we add more bash tests, which can help us from regressions and save manual testing efforts. Do you have any suggestions for testing the bash REPL (jline3)? |
I will give it some thought. I will start a PR as soon as I can. Which of the problems I described should be included? I notice that Should I include the fix for the potential misdirected script arguments problem?
|
@philwalk Yes, it will be better if the PR includes fix for the problem above. Your help is much appreciated. |
@philwalk If there is a potential to conflict with the current PR, then you can make a PR on top of this PR. And you can rebase after this is merged. |
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. Debug was undocumented anyway.
Thank you @michelou ! |
PR for console problems is #12411 |
Fix #12318: Support options to repl