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 {
|
||||
case Value(_) => StatusCode.Success
|
||||
case Inc(cause) =>
|
||||
var statusCodeOpt: Option[Int]
|
||||
def updateCode(code: Int): Unit =
|
||||
statusCodeOpt = Some(statusCodeOpt match {
|
||||
case None => code
|
||||
case Some(oldCode) => oldCode.max(code)
|
||||
})
|
||||
|
||||
Incomplete.visitAll(cause.getCause) {
|
||||
case _: CompileFailed => updateCode(StatusCode.Error)
|
||||
case _: InterruptedException => updateCode(StatusCode.Cancelled)
|
||||
cause.getCause match {
|
||||
case _: CompileFailed => StatusCode.Error
|
||||
case _: InterruptedException => StatusCode.Cancelled
|
||||
case err => throw cause
|
||||
}
|
||||
|
||||
statusCodeOpt.getOrElse(throw cause)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue