mirror of https://github.com/sbt/sbt.git
Skip retry on CompileCancelled
**Problem** When compilation fails, it's retrying 10 times since Retry now retries on non-IOExceptions. **Solution** This adds CompileFailed to excluded exception list.
This commit is contained in:
parent
a3a72b3245
commit
946b54c858
|
|
@ -11,7 +11,7 @@ import scala.util.Try
|
||||||
// ThisBuild settings take lower precedence,
|
// ThisBuild settings take lower precedence,
|
||||||
// but can be shared across the multi projects.
|
// but can be shared across the multi projects.
|
||||||
ThisBuild / version := {
|
ThisBuild / version := {
|
||||||
val v = "1.10.8-SNAPSHOT"
|
val v = "1.10.10-SNAPSHOT"
|
||||||
nightlyVersion.getOrElse(v)
|
nightlyVersion.getOrElse(v)
|
||||||
}
|
}
|
||||||
ThisBuild / version2_13 := "2.0.0-SNAPSHOT"
|
ThisBuild / version2_13 := "2.0.0-SNAPSHOT"
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import sbt.internal.server.BspCompileTask.exchange
|
||||||
import sbt.librarymanagement.Configuration
|
import sbt.librarymanagement.Configuration
|
||||||
import sbt.util.InterfaceUtil
|
import sbt.util.InterfaceUtil
|
||||||
import sjsonnew.support.scalajson.unsafe.Converter
|
import sjsonnew.support.scalajson.unsafe.Converter
|
||||||
|
import xsbti.CompileCancelled
|
||||||
import xsbti.CompileFailed
|
import xsbti.CompileFailed
|
||||||
import xsbti.Problem
|
import xsbti.Problem
|
||||||
import xsbti.Severity
|
import xsbti.Severity
|
||||||
|
|
@ -38,7 +39,7 @@ object BspCompileTask {
|
||||||
val task = BspCompileTask(targetId, project, config, ci)
|
val task = BspCompileTask(targetId, project, config, ci)
|
||||||
try {
|
try {
|
||||||
task.notifyStart()
|
task.notifyStart()
|
||||||
val result = Retry(compile(task))
|
val result = Retry(compile(task), classOf[CompileCancelled], classOf[CompileFailed])
|
||||||
task.notifySuccess(result)
|
task.notifySuccess(result)
|
||||||
result
|
result
|
||||||
} catch {
|
} catch {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue