From ef4a508676f764e7eed8f4cc99a7e2dbe141afe6 Mon Sep 17 00:00:00 2001 From: Alex Archambault Date: Mon, 5 Jan 2026 18:35:17 +0100 Subject: [PATCH 1/2] Clean-up unused variable and inline one with constant value --- compiler/test/dotty/tools/vulpix/ParallelTesting.scala | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala index 3a2f261a8e16..ff8ce8de2888 100644 --- a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala +++ b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala @@ -1570,7 +1570,7 @@ trait ParallelTesting extends RunnerOrchestration: val sourceDir = new JFile(f) checkRequirements(f, sourceDir, outDir) - val (dirs, files) = compilationTargets(sourceDir, fromTastyFilter) + val (_, files) = compilationTargets(sourceDir, fromTastyFilter) val filteredFiles = testFilter match case _ :: _ => files.filter(f => testFilter.exists(f.getPath.contains)) @@ -1581,19 +1581,17 @@ trait ParallelTesting extends RunnerOrchestration: file: JFile, flags: TestFlags, outDir: JFile, - fromTasty: Boolean = false, - ) extends JointCompilationSource(name, Array(file), flags, outDir, if (fromTasty) FromTasty else NotFromTasty) { + ) extends JointCompilationSource(name, Array(file), flags, outDir, FromTasty) { override def buildInstructions(errors: Int, warnings: Int): String = { val runOrPos = if (file.getPath.startsWith(s"tests${JFile.separator}run${JFile.separator}")) "run" else "pos" - val listName = if (fromTasty) "from-tasty" else "decompilation" s"""| |Test '$title' compiled with $errors error(s) and $warnings warning(s), |the test can be reproduced by running: | | sbt "testCompilation --from-tasty $file" | - |This tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}$runOrPos-$listName.excludelist` + |This tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}$runOrPos-from-tasty.excludelist` | |""".stripMargin } @@ -1602,7 +1600,7 @@ trait ParallelTesting extends RunnerOrchestration: val targets = filteredFiles.map { f => val classpath = createOutputDirsForFile(f, sourceDir, outDir) - new JointCompilationSourceFromTasty(testGroup.name, f, flags.withClasspath(classpath.getPath), classpath, fromTasty = true) + new JointCompilationSourceFromTasty(testGroup.name, f, flags.withClasspath(classpath.getPath), classpath) } // TODO add SeparateCompilationSource from tasty? From 52018a1611dc06d193e841d940508d2294adfc9f Mon Sep 17 00:00:00 2001 From: Alex Archambault Date: Mon, 22 Dec 2025 12:46:32 +0100 Subject: [PATCH 2/2] Actually run tests in FromTastyTests --- compiler/test/dotty/tools/dotc/FromTastyTests.scala | 4 ++-- compiler/test/dotty/tools/vulpix/ParallelTesting.scala | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/test/dotty/tools/dotc/FromTastyTests.scala b/compiler/test/dotty/tools/dotc/FromTastyTests.scala index fa1d9acff316..dd7fe64e50e4 100644 --- a/compiler/test/dotty/tools/dotc/FromTastyTests.scala +++ b/compiler/test/dotty/tools/dotc/FromTastyTests.scala @@ -22,7 +22,7 @@ class FromTastyTests { // > scalac -Ythrough-tasty -Ycheck:all implicit val testGroup: TestGroup = TestGroup("posTestFromTasty") - compileTastyInDir(s"tests${JFile.separator}pos", defaultOptions, + compileTastyInDir(s"tests${JFile.separator}pos", defaultOptions.and("-experimental"), fromTastyFilter = FileFilter.exclude(TestSources.posFromTastyExcludelisted) ).checkCompile() } @@ -34,7 +34,7 @@ class FromTastyTests { // > scala Test implicit val testGroup: TestGroup = TestGroup("runTestFromTasty") - compileTastyInDir(s"tests${JFile.separator}run", defaultOptions, + compileTastyInDir(s"tests${JFile.separator}run", defaultOptions.and("-experimental"), fromTastyFilter = FileFilter.exclude(TestSources.runFromTastyExcludelisted) ).checkRuns() } diff --git a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala index ff8ce8de2888..8e87f957ba74 100644 --- a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala +++ b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala @@ -1574,7 +1574,9 @@ trait ParallelTesting extends RunnerOrchestration: val filteredFiles = testFilter match case _ :: _ => files.filter(f => testFilter.exists(f.getPath.contains)) - case _ => Nil + case _ => files + + assert(filteredFiles.nonEmpty) class JointCompilationSourceFromTasty( name: String,