-
Notifications
You must be signed in to change notification settings - Fork 1.1k
repl eats program output #1369
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
Comments
We probably don't need the entire puzzle to reproduce the issue.
|
This is still an issue with the new repl |
I looked into this issue. The problem seems to be that the line redraw is oblivious to the output what is printed by the interpreted Scala code, because it only follows the standard input. So the redraw overwrites anything printed in the last line. I have two solutions, but I'm not sure if they are good solutions.
If any of these are acceptable or you have a better idea, I'd like to implement it. |
Ammonite-REPL seems to handle this correctly. Would be interesting to figure out how since our REPL UI code is based on Ammonite. |
I think a very simple fix would be to print a new line after a command is interpreted |
Ammonite prints an additional new line after each command. |
Keeping only one newline for Unit values if there are more of them, in a command.
Added ScriptedTests which keep the original output and input instead of cutting end of line whitespaces Added a test case for Unit
Added ScriptedTests which keep the original output and input instead of cutting end of line whitespaces Added a test case for Unit
Fix #1369 Print a newline after interpreted commands
taken from http://scalapuzzlers.com/#pzzlr-013
The numbers were printed, but then they were swallowed by repl and replaced by
scala>
invitation.The text was updated successfully, but these errors were encountered: