Skip to content

Commit

Permalink
Merge pull request #2382 from tgodzik/rename-server
Browse files Browse the repository at this point in the history
improvement: Rename server class so that it's easier to recognize if …
  • Loading branch information
tgodzik authored Jul 17, 2024
2 parents 71c5273 + 1392c9d commit d34bb81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ object Operations {

val (addressArgs, mainClass, writeOutputToOpt) = address match {
case BloopRifleConfig.Address.Tcp(host, port) =>
(Seq(host, port.toString), "bloop.Server", None)
(Seq(host, port.toString), "bloop.BloopServer", None)
case s: BloopRifleConfig.Address.DomainSocket =>
val writeOutputToOpt0 =
if (bloopServerSupportsFileTruncating) Some(s.outputPath)
else None

(Seq(s"daemon:${s.path}"), "bloop.Server", writeOutputToOpt0)
(Seq(s"daemon:${s.path}"), "bloop.BloopServer", writeOutputToOpt0)
}

val extraJavaOpts =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import libdaemonjvm.server._
import org.slf4j
import sun.misc.Signal

sealed abstract class Server
sealed abstract class BloopServer

object Server {
object BloopServer {
private def ensureSafeDirectoryExists(dir: Path): Unit =
if (!Files.exists(dir)) {
Files.createDirectories(dir)
Expand All @@ -46,7 +46,7 @@ object Server {
}
private val defaultPort: Int = 8212 // 8100 + 'p'
def main(args: Array[String]): Unit = {
def toPortNumber(userPort: String) = Try(userPort.toInt).getOrElse(Server.defaultPort)
def toPortNumber(userPort: String) = Try(userPort.toInt).getOrElse(BloopServer.defaultPort)
val lockFilesDirOrHostPort = args match {
case Array() =>
val dir = bloop.io.Paths.daemonDir.underlying
Expand Down Expand Up @@ -285,14 +285,14 @@ object Server {
new Alias(
"exit",
"Kill the bloop server.",
classOf[Server]
classOf[BloopServer]
)
)
aliasManager.addAlias(
new Alias(
"ng-stop",
"Kill the bloop server.",
classOf[Server]
classOf[BloopServer]
)
)

Expand Down

0 comments on commit d34bb81

Please sign in to comment.