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:
Eugene Yokota 2025-03-03 22:19:22 -05:00
parent a3a72b3245
commit 946b54c858
2 changed files with 3 additions and 2 deletions

View File

@ -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"

View File

@ -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 {