From fa674b0e7bb60ed993e63fcb2d05eedb6815a8d0 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 15 May 2023 20:17:45 -0700 Subject: [PATCH] . --- bsp/src/mill/bsp/BspContext.scala | 3 --- bsp/src/mill/bsp/BspWorker.scala | 1 - bsp/worker/src/mill/bsp/worker/BspWorkerImpl.scala | 3 --- bsp/worker/src/mill/bsp/worker/MillBuildServer.scala | 3 +-- 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/bsp/src/mill/bsp/BspContext.scala b/bsp/src/mill/bsp/BspContext.scala index 0baed2b20f3..97df1cf9fee 100644 --- a/bsp/src/mill/bsp/BspContext.scala +++ b/bsp/src/mill/bsp/BspContext.scala @@ -22,7 +22,6 @@ class BspContext(streams: SystemStreams, bspLogStream: Option[PrintStream], home BspContext.bspServerHandle = try { startBspServer( - initialEvaluator = None, streams = streams, logStream = bspLogStream, canReload = true @@ -39,7 +38,6 @@ class BspContext(streams: SystemStreams, bspLogStream: Option[PrintStream], home streams.err.println("BSP server started") def startBspServer( - initialEvaluator: Option[Evaluator], streams: SystemStreams, logStream: Option[PrintStream], canReload: Boolean @@ -62,7 +60,6 @@ class BspContext(streams: SystemStreams, bspLogStream: Option[PrintStream], home BspWorker(os.pwd, home, log).flatMap { worker => os.makeDir.all(home / Constants.bspDir) worker.startBspServer( - initialEvaluator, streams, logStream.getOrElse(streams.err), home / Constants.bspDir, diff --git a/bsp/src/mill/bsp/BspWorker.scala b/bsp/src/mill/bsp/BspWorker.scala index 39093618d61..e84d0686279 100644 --- a/bsp/src/mill/bsp/BspWorker.scala +++ b/bsp/src/mill/bsp/BspWorker.scala @@ -10,7 +10,6 @@ import java.net.URL @internal trait BspWorker { def startBspServer( - initialEvaluator: Option[Evaluator], streams: SystemStreams, logStream: PrintStream, logDir: os.Path, diff --git a/bsp/worker/src/mill/bsp/worker/BspWorkerImpl.scala b/bsp/worker/src/mill/bsp/worker/BspWorkerImpl.scala index 17ce6d9932d..f7f25686ff7 100644 --- a/bsp/worker/src/mill/bsp/worker/BspWorkerImpl.scala +++ b/bsp/worker/src/mill/bsp/worker/BspWorkerImpl.scala @@ -15,17 +15,14 @@ import scala.concurrent.{Await, CancellationException, Promise} private class BspWorkerImpl() extends BspWorker { override def startBspServer( - initialEvaluator: Option[Evaluator], streams: SystemStreams, logStream: PrintStream, logDir: os.Path, canReload: Boolean ): Either[String, BspServerHandle] = { - val evaluator = initialEvaluator.map(_.withFailFast(false)) val millServer = new MillBuildServer( - initialEvaluator = evaluator, bspVersion = Constants.bspProtocolVersion, serverVersion = MillBuildInfo.millVersion, serverName = Constants.serverName, diff --git a/bsp/worker/src/mill/bsp/worker/MillBuildServer.scala b/bsp/worker/src/mill/bsp/worker/MillBuildServer.scala index 59d1d0edabb..c2a86a6328e 100644 --- a/bsp/worker/src/mill/bsp/worker/MillBuildServer.scala +++ b/bsp/worker/src/mill/bsp/worker/MillBuildServer.scala @@ -74,7 +74,6 @@ import scala.util.{Failure, Success, Try} import Utils.sanitizeUri import mill.bsp.BspServerResult private class MillBuildServer( - initialEvaluator: Option[Evaluator], bspVersion: String, serverVersion: String, serverName: String, @@ -97,7 +96,7 @@ private class MillBuildServer( private[this] var statePromise: Promise[State] = Promise[State]() var evaluatorOpt: Option[Evaluator] = None def evaluator = evaluatorOpt.get - updateEvaluator(initialEvaluator) + def updateEvaluator(evaluator: Option[Evaluator]): Unit = { debug(s"Updating Evaluator: $evaluator") if (statePromise.isCompleted) statePromise = Promise[State]() // replace the promise