Skip to content

Commit 4504ac3

Browse files
committed
Improve the usage of inclusive language
Changes: - blacklist -> excludelist Discussion: - #21988
1 parent 1f0c576 commit 4504ac3

22 files changed

+52
-52
lines changed

Diff for: compiler/test/dotty/tools/TestSources.scala

+27-27
Original file line numberDiff line numberDiff line change
@@ -12,65 +12,65 @@ object TestSources {
1212

1313
// pos tests lists
1414

15-
def posFromTastyBlacklistFile: String = "compiler/test/dotc/pos-from-tasty.blacklist"
16-
def posTestPicklingBlacklistFile: String = "compiler/test/dotc/pos-test-pickling.blacklist"
15+
def posFromTastyExcludelistFile: String = "compiler/test/dotc/pos-from-tasty.excludelist"
16+
def posTestPicklingExcludelistFile: String = "compiler/test/dotc/pos-test-pickling.excludelist"
1717
def posTestRecheckExcludesFile: String = "compiler/test/dotc/pos-test-recheck.excludes"
1818
def posLazyValsAllowlistFile: String = "compiler/test/dotc/pos-lazy-vals-tests.allowlist"
1919
def posLintingAllowlistFile: String = "compiler/test/dotc/pos-linting.allowlist"
20-
def posInitGlobalScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/pos-init-global-scala2-library-tasty.blacklist"
20+
def posInitGlobalScala2LibraryTastyExcludelistFile: String = "compiler/test/dotc/pos-init-global-scala2-library-tasty.excludelist"
2121

22-
def posFromTastyBlacklisted: List[String] = loadList(posFromTastyBlacklistFile)
23-
def posTestPicklingBlacklisted: List[String] = loadList(posTestPicklingBlacklistFile)
22+
def posFromTastyExcludelisted: List[String] = loadList(posFromTastyExcludelistFile)
23+
def posTestPicklingExcludelisted: List[String] = loadList(posTestPicklingExcludelistFile)
2424
def posTestRecheckExcluded: List[String] = loadList(posTestRecheckExcludesFile)
2525
def posLazyValsAllowlist: List[String] = loadList(posLazyValsAllowlistFile)
2626
def posLintingAllowlist: List[String] = loadList(posLintingAllowlistFile)
27-
def posInitGlobalScala2LibraryTastyBlacklisted: List[String] =
28-
if Properties.usingScalaLibraryTasty then loadList(posInitGlobalScala2LibraryTastyBlacklistFile)
27+
def posInitGlobalScala2LibraryTastyExcludelisted: List[String] =
28+
if Properties.usingScalaLibraryTasty then loadList(posInitGlobalScala2LibraryTastyExcludelistFile)
2929
else Nil
3030

3131
// run tests lists
3232

33-
def runFromTastyBlacklistFile: String = "compiler/test/dotc/run-from-tasty.blacklist"
34-
def runTestPicklingBlacklistFile: String = "compiler/test/dotc/run-test-pickling.blacklist"
33+
def runFromTastyExcludelistFile: String = "compiler/test/dotc/run-from-tasty.excludelist"
34+
def runTestPicklingExcludelistFile: String = "compiler/test/dotc/run-test-pickling.excludelist"
3535
def runTestRecheckExcludesFile: String = "compiler/test/dotc/run-test-recheck.excludes"
3636
def runLazyValsAllowlistFile: String = "compiler/test/dotc/run-lazy-vals-tests.allowlist"
37-
def runMacrosScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/run-macros-scala2-library-tasty.blacklist"
37+
def runMacrosScala2LibraryTastyExcludelistFile: String = "compiler/test/dotc/run-macros-scala2-library-tasty.excludelist"
3838

39-
def runFromTastyBlacklisted: List[String] = loadList(runFromTastyBlacklistFile)
40-
def runTestPicklingBlacklisted: List[String] = loadList(runTestPicklingBlacklistFile)
39+
def runFromTastyExcludelisted: List[String] = loadList(runFromTastyExcludelistFile)
40+
def runTestPicklingExcludelisted: List[String] = loadList(runTestPicklingExcludelistFile)
4141
def runTestRecheckExcluded: List[String] = loadList(runTestRecheckExcludesFile)
4242
def runLazyValsAllowlist: List[String] = loadList(runLazyValsAllowlistFile)
43-
def runMacrosScala2LibraryTastyBlacklisted: List[String] =
44-
if Properties.usingScalaLibraryTasty then loadList(runMacrosScala2LibraryTastyBlacklistFile)
43+
def runMacrosScala2LibraryTastyExcludelisted: List[String] =
44+
if Properties.usingScalaLibraryTasty then loadList(runMacrosScala2LibraryTastyExcludelistFile)
4545
else Nil
4646

4747
// neg tests lists
4848

49-
def negScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/neg-scala2-library-tasty.blacklist"
50-
def negInitGlobalScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/neg-init-global-scala2-library-tasty.blacklist"
49+
def negScala2LibraryTastyExcludelistFile: String = "compiler/test/dotc/neg-scala2-library-tasty.excludelist"
50+
def negInitGlobalScala2LibraryTastyExcludelistFile: String = "compiler/test/dotc/neg-init-global-scala2-library-tasty.excludelist"
5151

52-
def negScala2LibraryTastyBlacklisted: List[String] =
53-
if Properties.usingScalaLibraryTasty then loadList(negScala2LibraryTastyBlacklistFile)
52+
def negScala2LibraryTastyExcludelisted: List[String] =
53+
if Properties.usingScalaLibraryTasty then loadList(negScala2LibraryTastyExcludelistFile)
5454
else Nil
55-
def negInitGlobalScala2LibraryTastyBlacklisted: List[String] =
56-
if Properties.usingScalaLibraryTasty then loadList(negInitGlobalScala2LibraryTastyBlacklistFile)
55+
def negInitGlobalScala2LibraryTastyExcludelisted: List[String] =
56+
if Properties.usingScalaLibraryTasty then loadList(negInitGlobalScala2LibraryTastyExcludelistFile)
5757
else Nil
5858

5959
// patmat tests lists
6060

61-
def patmatExhaustivityScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.blacklist"
61+
def patmatExhaustivityScala2LibraryTastyExcludelistFile: String = "compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.excludelist"
6262

63-
def patmatExhaustivityScala2LibraryTastyBlacklisted: List[String] =
64-
if Properties.usingScalaLibraryTasty then loadList(patmatExhaustivityScala2LibraryTastyBlacklistFile)
63+
def patmatExhaustivityScala2LibraryTastyExcludelisted: List[String] =
64+
if Properties.usingScalaLibraryTasty then loadList(patmatExhaustivityScala2LibraryTastyExcludelistFile)
6565
else Nil
6666

6767
// neg best effort tests lists
6868

69-
def negBestEffortPicklingBlacklistFile: String = "compiler/test/dotc/neg-best-effort-pickling.blacklist"
70-
def negBestEffortUnpicklingBlacklistFile: String = "compiler/test/dotc/neg-best-effort-unpickling.blacklist"
69+
def negBestEffortPicklingExcludelistFile: String = "compiler/test/dotc/neg-best-effort-pickling.excludelist"
70+
def negBestEffortUnpicklingExcludelistFile: String = "compiler/test/dotc/neg-best-effort-unpickling.excludelist"
7171

72-
def negBestEffortPicklingBlacklisted: List[String] = loadList(negBestEffortPicklingBlacklistFile)
73-
def negBestEffortUnpicklingBlacklisted: List[String] = loadList(negBestEffortUnpicklingBlacklistFile)
72+
def negBestEffortPicklingExcludelisted: List[String] = loadList(negBestEffortPicklingExcludelistFile)
73+
def negBestEffortUnpicklingExcludelisted: List[String] = loadList(negBestEffortUnpicklingExcludelistFile)
7474

7575
// load lists
7676

Diff for: compiler/test/dotty/tools/dotc/BestEffortOptionsTests.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class BestEffortOptionsTests {
2828

2929
implicit val testGroup: TestGroup = TestGroup("negTestFromBestEffortTasty")
3030
compileBestEffortTastyInDir(s"tests${JFile.separator}neg", bestEffortBaselineOptions,
31-
picklingFilter = FileFilter.exclude(TestSources.negBestEffortPicklingBlacklisted),
32-
unpicklingFilter = FileFilter.exclude(TestSources.negBestEffortUnpicklingBlacklisted)
31+
picklingFilter = FileFilter.exclude(TestSources.negBestEffortPicklingExcludelisted),
32+
unpicklingFilter = FileFilter.exclude(TestSources.negBestEffortUnpicklingExcludelisted)
3333
).checkNoCrash()
3434
}
3535

Diff for: compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class BootstrappedOnlyCompilationTests {
113113

114114
@Test def runMacros: Unit = {
115115
implicit val testGroup: TestGroup = TestGroup("runMacros")
116-
compileFilesInDir("tests/run-macros", defaultOptions.and("-Xcheck-macros"), FileFilter.exclude(TestSources.runMacrosScala2LibraryTastyBlacklisted))
116+
compileFilesInDir("tests/run-macros", defaultOptions.and("-Xcheck-macros"), FileFilter.exclude(TestSources.runMacrosScala2LibraryTastyExcludelisted))
117117
.checkRuns()
118118
}
119119

Diff for: compiler/test/dotty/tools/dotc/CompilationTests.scala

+5-5
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class CompilationTests {
139139
@Test def negAll: Unit = {
140140
implicit val testGroup: TestGroup = TestGroup("compileNeg")
141141
aggregateTests(
142-
compileFilesInDir("tests/neg", defaultOptions, FileFilter.exclude(TestSources.negScala2LibraryTastyBlacklisted)),
142+
compileFilesInDir("tests/neg", defaultOptions, FileFilter.exclude(TestSources.negScala2LibraryTastyExcludelisted)),
143143
compileFilesInDir("tests/neg-deep-subtype", allowDeepSubtypes),
144144
compileFilesInDir("tests/neg-custom-args/captures", defaultOptions.and("-language:experimental.captureChecking")),
145145
compileFile("tests/neg-custom-args/sourcepath/outer/nested/Test1.scala", defaultOptions.and("-sourcepath", "tests/neg-custom-args/sourcepath")),
@@ -182,8 +182,8 @@ class CompilationTests {
182182
@Test def pickling: Unit = {
183183
implicit val testGroup: TestGroup = TestGroup("testPickling")
184184
aggregateTests(
185-
compileFilesInDir("tests/pos", picklingOptions, FileFilter.exclude(TestSources.posTestPicklingBlacklisted)),
186-
compileFilesInDir("tests/run", picklingOptions, FileFilter.exclude(TestSources.runTestPicklingBlacklisted))
185+
compileFilesInDir("tests/pos", picklingOptions, FileFilter.exclude(TestSources.posTestPicklingExcludelisted)),
186+
compileFilesInDir("tests/run", picklingOptions, FileFilter.exclude(TestSources.runTestPicklingExcludelisted))
187187
).checkCompile()
188188
}
189189

@@ -228,8 +228,8 @@ class CompilationTests {
228228
// initialization tests
229229
@Test def checkInitGlobal: Unit = {
230230
implicit val testGroup: TestGroup = TestGroup("checkInitGlobal")
231-
compileFilesInDir("tests/init-global/warn", defaultOptions.and("-Ysafe-init-global"), FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyBlacklisted)).checkWarnings()
232-
compileFilesInDir("tests/init-global/pos", defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings"), FileFilter.exclude(TestSources.posInitGlobalScala2LibraryTastyBlacklisted)).checkCompile()
231+
compileFilesInDir("tests/init-global/warn", defaultOptions.and("-Ysafe-init-global"), FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyExcludelisted)).checkWarnings()
232+
compileFilesInDir("tests/init-global/pos", defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings"), FileFilter.exclude(TestSources.posInitGlobalScala2LibraryTastyExcludelisted)).checkCompile()
233233
}
234234

235235
// initialization tests

Diff for: compiler/test/dotty/tools/dotc/FromTastyTests.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class FromTastyTests {
2323

2424
implicit val testGroup: TestGroup = TestGroup("posTestFromTasty")
2525
compileTastyInDir(s"tests${JFile.separator}pos", defaultOptions,
26-
fromTastyFilter = FileFilter.exclude(TestSources.posFromTastyBlacklisted)
26+
fromTastyFilter = FileFilter.exclude(TestSources.posFromTastyExcludelisted)
2727
).checkCompile()
2828
}
2929

@@ -35,7 +35,7 @@ class FromTastyTests {
3535

3636
implicit val testGroup: TestGroup = TestGroup("runTestFromTasty")
3737
compileTastyInDir(s"tests${JFile.separator}run", defaultOptions,
38-
fromTastyFilter = FileFilter.exclude(TestSources.runFromTastyBlacklisted)
38+
fromTastyFilter = FileFilter.exclude(TestSources.runFromTastyExcludelisted)
3939
).checkRuns()
4040
}
4141
}

Diff for: compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import org.junit.Test
1010

1111
class ScannerTest extends DottyTest {
1212

13-
val blackList = List(
13+
val excluded = List(
1414
"/scaladoc/scala/tools/nsc/doc/html/page/Index.scala",
1515
"/scaladoc/scala/tools/nsc/doc/html/page/Template.scala"
1616
)
@@ -33,13 +33,13 @@ class ScannerTest extends DottyTest {
3333
def scanDir(path: String): Unit = scanDir(Directory(path))
3434

3535
def scanDir(dir: Directory): Unit = {
36-
if (blackList exists (dir.jpath.toString endsWith _))
37-
println(s"blacklisted package: ${dir.toAbsolute.jpath}")
36+
if (excluded exists (dir.jpath.toString endsWith _))
37+
println(s"excluded package: ${dir.toAbsolute.jpath}")
3838
else
3939
for (f <- dir.files)
4040
if (f.name.endsWith(".scala"))
41-
if (blackList exists (f.jpath.toString endsWith _))
42-
println(s"blacklisted file: ${f.toAbsolute.jpath}")
41+
if (excluded exists (f.jpath.toString endsWith _))
42+
println(s"excluded file: ${f.toAbsolute.jpath}")
4343
else
4444
scan(new PlainFile(f))
4545
for (d <- dir.dirs)

Diff for: compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ class PatmatExhaustivityTest {
6363

6464
@Test
6565
def patmatExhaustivity: Unit = {
66-
val blacklisted = TestSources.patmatExhaustivityScala2LibraryTastyBlacklisted.toSet
66+
val excluded = TestSources.patmatExhaustivityScala2LibraryTastyExcludelisted.toSet
6767
val res = Directory(testsDir).list.toList
6868
.filter(f => f.ext.isScala || f.isDirectory)
6969
.filter { f =>
7070
val path = if f.isDirectory then f.path + "/" else f.path
7171
Properties.testsFilter.isEmpty || Properties.testsFilter.exists(path.contains)
7272
}
73-
.filterNot(f => blacklisted.contains(f.name))
73+
.filterNot(f => excluded.contains(f.name))
7474
.map(f => if f.isDirectory then compileDir(f.jpath) else compileFile(f.jpath))
7575

7676
val failed = res.filter(!_)

Diff for: compiler/test/dotty/tools/vulpix/FileFilter.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ object FileFilter {
1111
exclude(file :: files.toList)
1212

1313
def exclude(files: List[String]): FileFilter = new FileFilter {
14-
private val blackList = files.toSet
15-
def accept(file: String): Boolean = !blackList.contains(file)
14+
private val excluded = files.toSet
15+
def accept(file: String): Boolean = !excluded.contains(file)
1616
}
1717

1818
def include(files: List[String]): FileFilter = new FileFilter {

Diff for: compiler/test/dotty/tools/vulpix/ParallelTesting.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
15791579
|
15801580
| sbt "testCompilation --from-tasty $file"
15811581
|
1582-
|This tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}$runOrPos-$listName.blacklist`
1582+
|This tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}$runOrPos-$listName.excludelist`
15831583
|
15841584
|""".stripMargin
15851585
}
@@ -1634,7 +1634,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
16341634
|
16351635
| sbt "scalac $bestEffortFlag $semanticDbFlag $file"
16361636
|
1637-
|These tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}neg-best-effort-pickling.blacklist`
1637+
|These tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}neg-best-effort-pickling.excludelist`
16381638
|""".stripMargin
16391639
}
16401640
}
@@ -1661,7 +1661,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
16611661
| sbt "scalac -Ybest-effort $file"
16621662
| sbt "scalac --from-tasty -Ywith-best-effort-tasty $beTastyFilesString"
16631663
|
1664-
|These tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}neg-best-effort-unpickling.blacklist`
1664+
|These tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}neg-best-effort-unpickling.excludelist`
16651665
|
16661666
|""".stripMargin
16671667
}

Diff for: docs/_docs/internals/best-effort-compilation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,5 @@ the previously created Best Effort TASTy, with `-Yread-tasty` and `-Ywith-best-e
8787
TreeUnpickler for those Best Effort TASTy files.
8888

8989
One of the goals of this feature is to keep the maintainance cost low, and to not let this feature hinder the pace of the
90-
overall development of the compiler. Because of that, the tests can be freely disabled in `compiler/neg-best-effort.blacklist`
91-
(testing TreePickler) and `compiler/neg-best-effort-from-tasty.blacklist` (testing TreeUnpickler).
90+
overall development of the compiler. Because of that, the tests can be freely disabled in `compiler/neg-best-effort.excludelist`
91+
(testing TreePickler) and `compiler/neg-best-effort-from-tasty.excludelist` (testing TreeUnpickler).

Diff for: project/Build.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,7 @@ object Build {
17081708
)
17091709
},
17101710

1711-
// A first blacklist of tests for those that do not compile or do not link
1711+
// A first excludelist of tests for those that do not compile or do not link
17121712
(Test / managedSources) ++= {
17131713
val dir = fetchScalaJSSource.value / "test-suite"
17141714

0 commit comments

Comments
 (0)