Skip to content

Commit 4f6a092

Browse files
committed
Revert "Remove from parallel"
This reverts commit 4b5d3e7.
1 parent 7b29f4c commit 4f6a092

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ class ExtractSemanticDB private (phaseMode: ExtractSemanticDB.PhaseMode) extends
6464
val sourceRoot = ctx.settings.sourceroot.value
6565
val appendDiagnostics = phaseMode == ExtractSemanticDB.PhaseMode.AppendDiagnostics
6666
if (appendDiagnostics)
67-
val warnings = ctx.reporter.allWarnings
68-
.groupBy(w => w.pos.source)
69-
.map((k, ws) => (k, ws.map(_.toSemanticDiagnostic)))
70-
.toMap
67+
val warnings = ctx.reporter.allWarnings.groupBy(w => w.pos.source)
7168
units.map { unit =>
7269
val unitCtx = ctx.fresh.setCompilationUnit(unit).withRootImports
7370
val outputDir =
@@ -80,7 +77,7 @@ class ExtractSemanticDB private (phaseMode: ExtractSemanticDB.PhaseMode) extends
8077
(outputDir, source)
8178
}.asJava.parallelStream().forEach { case (out, source) =>
8279
warnings.get(source).foreach { ws =>
83-
ExtractSemanticDB.appendDiagnostics(ws, out)
80+
ExtractSemanticDB.appendDiagnostics(ws.map(_.toSemanticDiagnostic), out)
8481
}
8582
}
8683
else

0 commit comments

Comments
 (0)