mirror of https://github.com/sbt/sbt.git
Merge pull request #8117 from sbt/revert-8109-bsp-compile-status-code
Revert "fix: BSP error status code in more cases"
This commit is contained in:
commit
684cb483b3
|
|
@ -789,19 +789,11 @@ object BuildServerProtocol {
|
||||||
Keys.compile.result.value match {
|
Keys.compile.result.value match {
|
||||||
case Value(_) => StatusCode.Success
|
case Value(_) => StatusCode.Success
|
||||||
case Inc(cause) =>
|
case Inc(cause) =>
|
||||||
var statusCodeOpt: Option[Int]
|
cause.getCause match {
|
||||||
def updateCode(code: Int): Unit =
|
case _: CompileFailed => StatusCode.Error
|
||||||
statusCodeOpt = Some(statusCodeOpt match {
|
case _: InterruptedException => StatusCode.Cancelled
|
||||||
case None => code
|
case err => throw cause
|
||||||
case Some(oldCode) => oldCode.max(code)
|
|
||||||
})
|
|
||||||
|
|
||||||
Incomplete.visitAll(cause.getCause) {
|
|
||||||
case _: CompileFailed => updateCode(StatusCode.Error)
|
|
||||||
case _: InterruptedException => updateCode(StatusCode.Cancelled)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
statusCodeOpt.getOrElse(throw cause)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue