Add retry to BspCompileTask.compute

There have been occasional failures on appveyor where an
AccessDeniedException was thrown at this point. AccessDeniedExceptions
thrown during scripted tests can often by resolved with a Retry.
This commit is contained in:
Ethan Atkins 2020-07-03 12:11:54 -07:00
parent 0941415420
commit e4c7747570
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ package sbt.internal.server
import sbt._
import sbt.internal.bsp._
import sbt.internal.io.Retry
import sbt.librarymanagement.Configuration
import sjsonnew.support.scalajson.unsafe.Converter
import xsbti.compile.CompileResult
@ -27,7 +28,7 @@ object BspCompileTask {
val task = BspCompileTask(targetId, project, config)
try {
notifyStart(task)
val result = compile
val result = Retry(compile)
notifySuccess(task, result)
result
} catch {