Skip to content

Commit 4b5d3e7

Browse files
committed
Remove from parallel
1 parent d7258b4 commit 4b5d3e7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ class ExtractSemanticDB private (phaseMode: ExtractSemanticDB.PhaseMode) extends
6767
val sourceRoot = ctx.settings.sourceroot.value
6868
val appendDiagnostics = phaseMode == ExtractSemanticDB.PhaseMode.AppendDiagnostics
6969
if (appendDiagnostics)
70-
val warnings = ctx.reporter.allWarnings.groupBy(w => w.pos.source)
70+
val warnings = ctx.reporter.allWarnings
71+
.groupBy(w => w.pos.source)
72+
.map((k, ws) => (k, ws.map(_.toSemanticDiagnostic)))
73+
.toMap
7174
units.map { unit =>
7275
val unitCtx = ctx.fresh.setCompilationUnit(unit).withRootImports
7376
val outputDir =
@@ -80,7 +83,7 @@ class ExtractSemanticDB private (phaseMode: ExtractSemanticDB.PhaseMode) extends
8083
(outputDir, source)
8184
}.asJava.parallelStream().forEach { case (out, source) =>
8285
warnings.get(source).foreach { ws =>
83-
ExtractSemanticDB.appendDiagnostics(source, ws.map(_.toSemanticDiagnostic), out)
86+
ExtractSemanticDB.appendDiagnostics(source, ws, out)
8487
}
8588
}
8689
else

0 commit comments

Comments
 (0)