8000 Ignore Bloop server early exit if it signals an already running server by alexarchambault · Pull Request #1799 · VirtusLab/scala-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ignore Bloop server early exit if it signals an already running server #1799

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

8000
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ object Operations {
envExists && findInPath("sh").nonEmpty
}

private def serverAlreadyRunningExitCode = 222

/** Starts a new bloop server.
*
* @param host
Expand Down Expand Up @@ -235,8 +237,16 @@ object Operations {
val start = System.currentTimeMillis()
() =>
try {
lazy val exitCode = {
val value = p.exitValue()
if (value == serverAlreadyRunningExitCode)
logger.debug(s"Bloop server exited with code $value (server already running)")
else
logger.debug(s"Bloop server exited with code $value")
value
}
val completionOpt =
if (!p.isAlive())
if (!p.isAlive() && exitCode != serverAlreadyRunningExitCode)
Some(Failure(new FailedToStartServerException))
else if (check(address, logger))
Some(Success(()))
Expand Down
2 changes: 1 addition & 1 deletion project/deps.sc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ object Deps {
// that Scala CLI supports.
def ammonite = ivy"com.lihaoyi:::ammonite:2.5.6-1-f8bff243"
def asm = ivy"org.ow2.asm:asm:9.4"
def bloop = ivy"io.github.alexarchambault.bleep:bloop-frontend_2.12:1.5.6-sc-2"
def bloop = ivy"io.github.alexarchambault.bleep:bloop-frontend_2.12:1.5.6-sc-3"
// Force using of 2.13 - is there a better way?
def bloopConfig = ivy"ch.epfl.scala:bloop-config_2.13:1.5.5"
def bsp4j = ivy"ch.epfl.scala:bsp4j:2.1.0-M3"
Expand Down
0