From e4c7747570789e18dfb1142604a9a46eea1ffc04 Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Fri, 3 Jul 2020 12:11:54 -0700 Subject: [PATCH] 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. --- main/src/main/scala/sbt/internal/server/BspCompileTask.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/src/main/scala/sbt/internal/server/BspCompileTask.scala b/main/src/main/scala/sbt/internal/server/BspCompileTask.scala index a0d035bf1..e8a7ae7a0 100644 --- a/main/src/main/scala/sbt/internal/server/BspCompileTask.scala +++ b/main/src/main/scala/sbt/internal/server/BspCompileTask.scala @@ -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 {