diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-21 21:05:37 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-24 17:13:03 -0800 |
commit | c98408adf2d96928fe227a740631a8efd8e0c339 (patch) | |
tree | 5a36d9ee7d8ee6e1f7f9247cd7ddd31b194df5df /main/src/mill/main/MainRunner.scala | |
parent | 51db54d4f1deefb34b9d7f6581611ae166652493 (diff) | |
download | mill-c98408adf2d96928fe227a740631a8efd8e0c339.tar.gz mill-c98408adf2d96928fe227a740631a8efd8e0c339.tar.bz2 mill-c98408adf2d96928fe227a740631a8efd8e0c339.zip |
Clean up the provisional client-server code with unit tests and proper file-sockets
Seems to work well enough for interactive scala consoles, though still not Ammonite
Also Added ScalaModule#launcher and re-worked our build.sc file to use it
Diffstat (limited to 'main/src/mill/main/MainRunner.scala')
-rw-r--r-- | main/src/mill/main/MainRunner.scala | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/main/src/mill/main/MainRunner.scala b/main/src/mill/main/MainRunner.scala index 2bd7fbc6..907f8a7b 100644 --- a/main/src/mill/main/MainRunner.scala +++ b/main/src/mill/main/MainRunner.scala @@ -5,12 +5,9 @@ import ammonite.interp.{Interpreter, Preprocessor} import ammonite.ops.Path import ammonite.util._ import mill.eval.{Evaluator, PathRef} -import mill.main.MainRunner.WatchInterrupted + import mill.util.PrintLogger -object MainRunner{ - case class WatchInterrupted(stateCache: Option[Evaluator.State]) extends Exception -} /** * Customized version of [[ammonite.MainRunner]], allowing us to run Mill @@ -37,7 +34,7 @@ class MainRunner(val config: ammonite.main.Cli.Config, } while(statAll()) { - if (interruptWatch()) throw WatchInterrupted(stateCache) + if (interruptWatch()) throw mill.clientserver.WatchInterrupted(stateCache) Thread.sleep(100) } } @@ -58,7 +55,8 @@ class MainRunner(val config: ammonite.main.Cli.Config, colors, outprintStream, errPrintStream, - errPrintStream + errPrintStream, + stdIn ) ) |