Skip to content

Commit

Permalink
try to debug semanticdb
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal committed May 24, 2024
1 parent f88a97d commit 9f405ae
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.junit.experimental.categories.Category
import dotty.BootstrappedOnlyTests
import dotty.tools.dotc.Main
import dotty.tools.dotc.semanticdb.Scala3.given
import dotty.tools.dotc.util.SourceFile
import dotty.tools.dotc.util.{SourceFile, DiffUtil}

@main def updateExpect =
SemanticdbTests().runExpectTest(updateExpectFiles = true)
Expand Down Expand Up @@ -77,6 +77,7 @@ class SemanticdbTests:
val expectName = expectPath.getFileName
val relExpect = rootSrc.relativize(expectPath)
if expected.trim != obtained.trim then
println(DiffUtil.mkColoredLineDiff(obtained.trim().linesIterator.toSeq, expected.trim().linesIterator.toSeq))
Files.write(expectPath.resolveSibling("" + expectName + ".out"), obtained.getBytes(StandardCharsets.UTF_8))
errors += expectPath
for source <- inputFiles().sorted do
Expand Down

0 comments on commit 9f405ae

Please sign in to comment.