Unable to use dotr under cygwin.. see output below
$ dotr
Starting dotty REPL...
Welcome to Scala.next (pre-alpha, git-hash: 05aeeb5) (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_121).
Type in expressions to have them evaluated.
Type :help for more information.
bash: /dev/tty: No such device or address
Exception in thread "main" java.lang.NullPointerException
at dotty.tools.dotc.repl.ammonite.terminal.Terminal$.initialConfig$1(Terminal.scala:297)
at dotty.tools.dotc.repl.ammonite.terminal.Terminal$.readLine(Terminal.scala:307)
at dotty.tools.dotc.repl.AmmoniteReader.readLine(AmmoniteReader.scala:74)
at dotty.tools.dotc.repl.InterpreterLoop.run(InterpreterLoop.scala:202)
at dotty.tools.dotc.repl.REPL.doCompile(REPL.scala:43)
at dotty.tools.dotc.Driver.process(Driver.scala:124)
at dotty.tools.dotc.Driver.process(Driver.scala:93)
at dotty.tools.dotc.Driver.process(Driver.scala:105)
at dotty.tools.dotc.Driver.main(Driver.scala:132)
at dotty.tools.dotc.repl.Main.main(Main.scala)
Thanks for reporting the bug @flomebul . We are now working on make Windows part of the CI, hope it will provide better experience with windows.
cc: @felixmulder Anmonite has some assumptions on bash?
compiler/src/dotty/tools/dotc/repl/ammonite/Utils.scala
83: Seq("bash", "-c", s"$pathedTput $s 2> /dev/tty").!!.trim.toInt
103: Seq("bash", "-c", s"$pathedStty $s < /dev/tty"): ProcessBuilder
Yeah, ammonite does not seem to work by default on Windows currently, but can work if you set some manually set some settings, see https://github.com/lihaoyi/Ammonite/issues/119#issuecomment-128209044, a later post in the issue describes what's missing for it to work automatically: https://github.com/lihaoyi/Ammonite/issues/119#issuecomment-234425033
I'm not sure if this is relevant, but I'm experiencing a very similar problem running the dotty REPL on Ubuntu:
[info] Running dotty.tools.repl.Main -classpath /home/maseev/projects/dotty/library/target/scala-2.12/dotty-library_2.12-0.5.0-bin-SNAPSHOT-nonbootstrapped.jar
bash: /dev/tty: No such device or address
bash: /dev/tty: No such device or address
Exception in thread "main" java.lang.RuntimeException: Nonzero exit value: 1
at scala.sys.package$.error(package.scala:27)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.slurp(ProcessBuilderImpl.scala:134)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang$bang(ProcessBuilderImpl.scala:104)
at dotty.tools.repl.terminal.TTY$.stty(Utils.scala:106)
at dotty.tools.repl.terminal.TTY$.init(Utils.scala:85)
at dotty.tools.repl.terminal.Terminal$.x$7$lzycompute$1(Terminal.scala:302)
at dotty.tools.repl.terminal.Terminal$.x$7$1(Terminal.scala:302)
at dotty.tools.repl.terminal.Terminal$.initialConfig$lzycompute$1(Terminal.scala:302)
at dotty.tools.repl.terminal.Terminal$.initialConfig$1(Terminal.scala:302)
at dotty.tools.repl.terminal.Terminal$.readLine(Terminal.scala:313)
at dotty.tools.repl.AmmoniteReader.prompt(AmmoniteReader.scala:125)
at dotty.tools.repl.ReplDriver.readLine(ReplDriver.scala:182)
at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:133)
at dotty.tools.repl.Main$.main(Main.scala:6)
at dotty.tools.repl.Main.main(Main.scala)
java.lang.RuntimeException: Nonzero exit code returned from runner: 1
at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run last dotty-compiler/compile:runMain for the full output.
[error] (dotty-compiler/compile:runMain) Nonzero exit code returned from runner: 1
[error] Total time: 46 s, completed Oct 27, 2017 5:47:10 PM
[IJ]>
Linux 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
We've since switched to JLine 3 for the REPL which should support Windows, please reopen if this issue is still present.
Most helpful comment
Yeah, ammonite does not seem to work by default on Windows currently, but can work if you set some manually set some settings, see https://github.com/lihaoyi/Ammonite/issues/119#issuecomment-128209044, a later post in the issue describes what's missing for it to work automatically: https://github.com/lihaoyi/Ammonite/issues/119#issuecomment-234425033