File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
compiler/src/dotty/tools/dotc/semanticdb Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,10 @@ class ExtractSemanticDB private (phaseMode: ExtractSemanticDB.PhaseMode) extends
67
67
val sourceRoot = ctx.settings.sourceroot.value
68
68
val appendDiagnostics = phaseMode == ExtractSemanticDB .PhaseMode .AppendDiagnostics
69
69
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
71
74
units.map { unit =>
72
75
val unitCtx = ctx.fresh.setCompilationUnit(unit).withRootImports
73
76
val outputDir =
@@ -80,7 +83,7 @@ class ExtractSemanticDB private (phaseMode: ExtractSemanticDB.PhaseMode) extends
80
83
(outputDir, source)
81
84
}.asJava.parallelStream().forEach { case (out, source) =>
82
85
warnings.get(source).foreach { ws =>
83
- ExtractSemanticDB .appendDiagnostics(source, ws.map(_.toSemanticDiagnostic) , out)
86
+ ExtractSemanticDB .appendDiagnostics(source, ws, out)
84
87
}
85
88
}
86
89
else
You can’t perform that action at this time.
0 commit comments