From 369c498ffb2a5a5fc61e678846d9403c109f07ba Mon Sep 17 00:00:00 2001 From: Jan Chyb Date: Fri, 24 May 2024 16:22:23 +0200 Subject: [PATCH] Fix reporting after deduplicating compilations Previously in some cases when deduplicating bloop would report the `previousSuccessfullCompilation` in which case bsp clients like metals could have their diagnostics overwritten with outdated ones. --- .../scala/bloop/engine/tasks/compilation/CompileGraph.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/main/scala/bloop/engine/tasks/compilation/CompileGraph.scala b/frontend/src/main/scala/bloop/engine/tasks/compilation/CompileGraph.scala index f596ce335f..da644240aa 100644 --- a/frontend/src/main/scala/bloop/engine/tasks/compilation/CompileGraph.scala +++ b/frontend/src/main/scala/bloop/engine/tasks/compilation/CompileGraph.scala @@ -197,7 +197,7 @@ object CompileGraph { case a: ReporterAction.ProcessEndCompilation => a.code match { case BspStatusCode.Cancelled | BspStatusCode.Error => - reporter.processEndCompilation(previousSuccessfulProblems, a.code, None, None) + reporter.processEndCompilation(previousProblems, a.code, None, None) reporter.reportEndCompilation() case _ => /* @@ -207,7 +207,7 @@ object CompileGraph { * can use `taskFinish` notifications as a signal to process them. */ reporter.processEndCompilation( - previousSuccessfulProblems, + previousProblems, a.code, Some(clientClassesObserver.classesDir), Some(bundle.out.analysisOut)