From fee17de68eb168a38bf2006c94174cd31a690987 Mon Sep 17 00:00:00 2001 From: Adrien Piquerez Date: Fri, 29 Oct 2021 10:51:02 +0200 Subject: [PATCH] Fix error summary printed twice Fix https://github.com/sbt/sbt/issues/6687 `printSummary` is already called in `Driver.finish`: https://github.com/lampepfl/dotty/blob/29f03741b9668c5052ec2b9502d061b7ecd614df/compiler/src/dotty/tools/dotc/Driver.scala#L53 --- sbt-bridge/src/dotty/tools/xsbt/CompilerBridgeDriver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbt-bridge/src/dotty/tools/xsbt/CompilerBridgeDriver.java b/sbt-bridge/src/dotty/tools/xsbt/CompilerBridgeDriver.java index 6c622063a141..12291120b157 100644 --- a/sbt-bridge/src/dotty/tools/xsbt/CompilerBridgeDriver.java +++ b/sbt-bridge/src/dotty/tools/xsbt/CompilerBridgeDriver.java @@ -91,10 +91,10 @@ public int compare(VirtualFile x0, VirtualFile x1) { callback.problem(problem.category(), problem.position(), problem.message(), problem.severity(), true); } + } else { + delegate.printSummary(); } - delegate.printSummary(); - if (delegate.hasErrors()) { log.debug(() -> "Compilation failed"); throw new InterfaceCompileFailed(args, delegate.problems(), "Compilation failed");