Skip to content

Commit a055aad

Browse files
committed
Sync blacklisted files
1 parent 771f53b commit a055aad

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,30 @@ class CompilationTests extends ParallelTesting {
207207
compileDir("../library/src",
208208
allowDeepSubtypes.and("-Ycheck-reentrant", "-strict", "-priorityclasspath", defaultOutputDir))
209209

210+
def sources(paths: JStream[Path], excludedFiles: List[String] = Nil): List[String] =
211+
paths.iterator().asScala
212+
.filter(path =>
213+
(path.toString.endsWith(".scala") || path.toString.endsWith(".java"))
214+
&& !excludedFiles.contains(path.getFileName.toString))
215+
.map(_.toString).toList
216+
217+
val compilerDir = Paths.get("../compiler/src")
218+
val compilerSources = sources(Files.walk(compilerDir))
219+
220+
val backendDir = Paths.get("../scala-backend/src/compiler/scala/tools/nsc/backend")
221+
val backendJvmDir = Paths.get("../scala-backend/src/compiler/scala/tools/nsc/backend/jvm")
222+
223+
// NOTE: Keep these exclusions synchronized with the ones in the sbt build (Build.scala)
224+
val backendExcluded =
225+
List("JavaPlatform.scala", "Platform.scala", "ScalaPrimitives.scala")
226+
val backendJvmExcluded =
227+
List("BCodeICodeCommon.scala", "GenASM.scala", "GenBCode.scala", "ScalacBackendInterface.scala", "BackendStats.scala", "BCodeAsmEncode.scala")
228+
229+
val backendSources =
230+
sources(Files.list(backendDir), excludedFiles = backendExcluded)
231+
val backendJvmSources =
232+
sources(Files.list(backendJvmDir), excludedFiles = backendJvmExcluded)
233+
210234
def dotty1 = {
211235
compileList(
212236
"dotty1",
@@ -339,7 +363,7 @@ class CompilationTests extends ParallelTesting {
339363
val backendExcluded =
340364
List("JavaPlatform.scala", "Platform.scala", "ScalaPrimitives.scala")
341365
val backendJvmExcluded =
342-
List("BCodeICodeCommon.scala", "GenASM.scala", "GenBCode.scala", "ScalacBackendInterface.scala")
366+
List("BCodeICodeCommon.scala", "GenASM.scala", "GenBCode.scala", "ScalacBackendInterface.scala", "BackendStats.scala")
343367

344368
val backendSources0 =
345369
sources(Files.list(backendDir), excludedFiles = backendExcluded)

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ object Build {
375375
val files = ((backendDir *
376376
(allScalaFiles - "JavaPlatform.scala" - "Platform.scala" - "ScalaPrimitives.scala")) +++
377377
(backendDir / "jvm") *
378-
(allScalaFiles - "BCodeICodeCommon.scala" - "GenASM.scala" - "GenBCode.scala" - "ScalacBackendInterface.scala" - "BackendStats.scala" - "BCodeAsmEncode.scala")
378+
(allScalaFiles - "BCodeICodeCommon.scala" - "GenASM.scala" - "GenBCode.scala" - "ScalacBackendInterface.scala" - "BackendStats.scala")
379379
).get
380380

381381
val pairs = files.pair(sbt.Path.rebase(submoduleCompilerDir, outputDir))

0 commit comments

Comments
 (0)