-
Notifications
You must be signed in to change notification settings - Fork 221
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
fragile detection of windows console, and bad REPL
experience in cygwin
#669
Comments
@mattirn I've been look at windows since a few days for another purpose. |
BTW, here's what the build output looks like on my $uname -a
CYGWIN_NT-10.0 d5 3.2.0(0.340/5/3) 2021-03-29 08:42 x86_64 Cygwin
$./build rebuild
[snip ...]
[←[1;34mINFO←[m]
[←[1;34mINFO←[m] JLine Parent 3.17.2-SNAPSHOT ....................... ←[1;32mSUCCESS←[m [ 9.259 s]
[←[1;34mINFO←[m] JLine Terminal ..................................... ←[1;32mSUCCESS←[m [ 13.377 s]
[←[1;34mINFO←[m] JLine JNA Terminal ................................. ←[1;32mSUCCESS←[m [ 5.785 s]
[←[1;34mINFO←[m] JLine JANSI Terminal ............................... ←[1;32mSUCCESS←[m [ 5.255 s]
[←[1;34mINFO←[m] JLine Reader ....................................... ←[1;32mSUCCESS←[m [ 11.495 s]
[←[1;34mINFO←[m] JLine Style ........................................ ←[1;32mSUCCESS←[m [ 5.180 s]
[←[1;34mINFO←[m] JLine Builtins ..................................... ←[1;32mSUCCESS←[m [ 39.108 s]
[←[1;34mINFO←[m] JLine Console ...................................... ←[1;32mSUCCESS←[m [ 7.091 s]
[←[1;34mINFO←[m] JLine Groovy ....................................... ←[1;32mSUCCESS←[m [ 6.536 s]
[←[1;34mINFO←[m] JLine Remote SSH ................................... ←[1;32mSUCCESS←[m [ 3.166 s]
[←[1;34mINFO←[m] JLine Remote Telnet ................................ ←[1;32mSUCCESS←[m [ 3.355 s]
[←[1;34mINFO←[m] JLine Bundle ....................................... ←[1;32mSUCCESS←[m [ 19.236 s]
[←[1;34mINFO←[m] JLine Demo ......................................... ←[1;32mSUCCESS←[m [ 3.319 s]
[←[1;34mINFO←[m] JLine Graal Demo 3.17.2-SNAPSHOT ................... ←[1;32mSUCCESS←[m [ 2.875 s]
[←[1;34mINFO←[m] ←[1m------------------------------------------------------------------------←[m
[←[1;34mINFO←[m] ←[1;32mBUILD SUCCESS←[m
[←[1;34mINFO←[m] ←[1m------------------------------------------------------------------------←[m
[←[1;34mINFO←[m] Total time: 02:15 min
[←[1;34mINFO←[m] Finished at: 2021-05-12T11:17:21-06:00
[←[1;34mINFO←[m] ←[1m------------------------------------------------------------------------←[m In CYGWIN_NT-10.0 d5 3.2.0(0.340/5/3) 2021-03-29 08:42 x86_64 Cygwin
MINGW64_NT-10.0-19042 d5 3.1.7-340.x86_64 2020-11-08 12:32 UTC x86_64 Msys
MINGW32_NT-10.0-19042 d5 3.1.7-340.x86_64 2020-11-08 12:32 UTC x86_64 Msys
MSYS_NT-10.0-19042 d5 3.1.7-340.x86_64 2020-11-08 12:32 UTC x86_64 Msys In $ uname -a
CYGWIN_NT-10.0 d5 3.2.0(0.340/5/3) 2021-03-29 08:42 x86_64 Cygwin
$ scala
←[?1h←=←[90m~←[0m
←[?2004h←[34mscala> ←[0m:q
←[?1l←>←[?2004l
philwalk@d5 /opt/ue This fixes the arrow keys problem, but not the display, and in addition, our workaround no longer fixes the display problem. WRT
For May 12, 2021 12:03:41 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
scala> 1 |[A
| ^
| ']' expected, but eof found
May 12, 2021 12:03:43 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
scala> Exception in thread "main" java.lang.NullPointerException
at dotty.tools.repl.JLineTerminal.close(JLineTerminal.scala:75)
at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:149)
at dotty.tools.repl.ReplDriver.tryRunning(ReplDriver.scala:114)
at dotty.tools.repl.Main$.main(Main.scala:6)
at dotty.tools.repl.Main.main(Main.scala) With Manual testing this stuff is a bit tedious, as you know, hopefully I haven't reported anything incorrectly. |
Tested PR 670 locally via |
It would be nice to check with a few older cygwin versions to make sure it also works. |
This problem is described in some detail here: scala/scala3#12405.
There are two separate (inter-related) problems:
CMD
session is incorrectly identified as acygwin
session ifPWD=/Users
(for example)org.jline.utils.OSUtils
, is unusableThe 2nd problem has no easy workaround, other than to trick
jline3
into mis-identifying the environment.Without knowing what the root cause is, so I can't say whether the fix will be in
jline3
or inscala3
.Here's what a failed
REPL
session looks like:and here's what it should look like:
$ scala scala> :q philwalk@d5:/opt/ue
The text was updated successfully, but these errors were encountered: