diff --git a/compiler/src/dotty/tools/dotc/core/Contexts.scala b/compiler/src/dotty/tools/dotc/core/Contexts.scala index 7c54d1392720..4f43d6c6663b 100644 --- a/compiler/src/dotty/tools/dotc/core/Contexts.scala +++ b/compiler/src/dotty/tools/dotc/core/Contexts.scala @@ -122,7 +122,7 @@ object Contexts { * risk of capturing complete trees. * - To make sure these rules are kept, it would be good to do a sanity * check using bytecode inspection with javap or scalap: Keep track - * of all class fields of type context; allow them only in whitelisted + * of all class fields of type context; allow them only in allowlisted * classes (which should be short-lived). */ abstract class Context(val base: ContextBase) { thiscontext => diff --git a/compiler/src/dotty/tools/dotc/core/Definitions.scala b/compiler/src/dotty/tools/dotc/core/Definitions.scala index 2890bdf306be..9a351b5eab8c 100644 --- a/compiler/src/dotty/tools/dotc/core/Definitions.scala +++ b/compiler/src/dotty/tools/dotc/core/Definitions.scala @@ -1957,7 +1957,7 @@ class Definitions { Some((args.init, args.last)) case _ => None - /** A whitelist of Scala-2 classes that are known to be pure */ + /** A allowlist of Scala-2 classes that are known to be pure */ def isAssuredNoInits(sym: Symbol): Boolean = (sym `eq` SomeClass) || isTupleClass(sym) diff --git a/compiler/src/dotty/tools/dotc/core/Names.scala b/compiler/src/dotty/tools/dotc/core/Names.scala index 3f9667b08067..a31ab0662ee4 100644 --- a/compiler/src/dotty/tools/dotc/core/Names.scala +++ b/compiler/src/dotty/tools/dotc/core/Names.scala @@ -401,7 +401,7 @@ object Names { } /** It's OK to take a toString if the stacktrace does not contain a method - * from GenBCode or it also contains one of the whitelisted methods below. + * from GenBCode or it also contains one of the allowed methods below. */ private def toStringOK = { val trace: Array[StackTraceElement] = Thread.currentThread.nn.getStackTrace.asInstanceOf[Array[StackTraceElement]] diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala index 3af0fc6603d5..cfbdc854a88f 100644 --- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala +++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala @@ -1079,7 +1079,7 @@ class ClassfileParser( // Nothing$ and Null$ were incorrectly emitted with a Scala attribute // instead of ScalaSignature before 2.13.0-M2, see https://github.com/scala/scala/pull/5952 - private val scalaUnpickleWhitelist = List(tpnme.nothingClass, tpnme.nullClass) + private val scalaUnpickleAllowlist = List(tpnme.nothingClass, tpnme.nullClass) /** Parse inner classes. Expects `in.bp` to point to the superclass entry. * Restores the old `bp`. @@ -1152,7 +1152,7 @@ class ClassfileParser( return None } - if scan(tpnme.ScalaATTR) && !scalaUnpickleWhitelist.contains(classRoot.name) + if scan(tpnme.ScalaATTR) && !scalaUnpickleAllowlist.contains(classRoot.name) && !(classRoot.name.startsWith("Tuple") && classRoot.name.endsWith("$sp")) && !(classRoot.name.startsWith("Product") && classRoot.name.endsWith("$sp")) then diff --git a/compiler/src/dotty/tools/dotc/transform/init/Objects.scala b/compiler/src/dotty/tools/dotc/transform/init/Objects.scala index 52760cf8b6c7..736d33e98197 100644 --- a/compiler/src/dotty/tools/dotc/transform/init/Objects.scala +++ b/compiler/src/dotty/tools/dotc/transform/init/Objects.scala @@ -82,7 +82,7 @@ class Objects(using Context @constructorOnly): val immutableLazyList: Symbol = requiredModule("scala.collection.immutable.LazyList") val LazyList_empty: Symbol = immutableLazyList.requiredValue("_empty") - val whiteList: Set[Symbol] = Set(SetNode_EmptySetNode, HashSet_EmptySet, Vector_EmptyIterator, MapNode_EmptyMapNode, HashMap_EmptyMap, LazyList_empty) + val allowList: Set[Symbol] = Set(SetNode_EmptySetNode, HashSet_EmptySet, Vector_EmptyIterator, MapNode_EmptyMapNode, HashMap_EmptyMap, LazyList_empty) // ----------------------------- abstract domain ----------------------------- @@ -1728,7 +1728,7 @@ class Objects(using Context @constructorOnly): tpl.body.foreach { case vdef : ValDef if !vdef.symbol.is(Flags.Lazy) && !vdef.rhs.isEmpty => val sym = vdef.symbol - val res = if (whiteList.contains(sym)) Bottom else eval(vdef.rhs, thisV, klass) + val res = if (allowList.contains(sym)) Bottom else eval(vdef.rhs, thisV, klass) if sym.is(Flags.Mutable) then val addr = Heap.fieldVarAddr(summon[Regions.Data], sym, State.currentObject) thisV.initVar(sym, addr) diff --git a/compiler/test/dotc/neg-best-effort-pickling.blacklist b/compiler/test/dotc/neg-best-effort-pickling.excludelist similarity index 100% rename from compiler/test/dotc/neg-best-effort-pickling.blacklist rename to compiler/test/dotc/neg-best-effort-pickling.excludelist diff --git a/compiler/test/dotc/neg-best-effort-unpickling.blacklist b/compiler/test/dotc/neg-best-effort-unpickling.excludelist similarity index 100% rename from compiler/test/dotc/neg-best-effort-unpickling.blacklist rename to compiler/test/dotc/neg-best-effort-unpickling.excludelist diff --git a/compiler/test/dotc/neg-init-global-scala2-library-tasty.blacklist b/compiler/test/dotc/neg-init-global-scala2-library-tasty.excludelist similarity index 100% rename from compiler/test/dotc/neg-init-global-scala2-library-tasty.blacklist rename to compiler/test/dotc/neg-init-global-scala2-library-tasty.excludelist diff --git a/compiler/test/dotc/neg-scala2-library-tasty.blacklist b/compiler/test/dotc/neg-scala2-library-tasty.excludelist similarity index 100% rename from compiler/test/dotc/neg-scala2-library-tasty.blacklist rename to compiler/test/dotc/neg-scala2-library-tasty.excludelist diff --git a/compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.blacklist b/compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.excludelist similarity index 100% rename from compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.blacklist rename to compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.excludelist diff --git a/compiler/test/dotc/pos-from-tasty.blacklist b/compiler/test/dotc/pos-from-tasty.excludelist similarity index 100% rename from compiler/test/dotc/pos-from-tasty.blacklist rename to compiler/test/dotc/pos-from-tasty.excludelist diff --git a/compiler/test/dotc/pos-init-global-scala2-library-tasty.blacklist b/compiler/test/dotc/pos-init-global-scala2-library-tasty.excludelist similarity index 100% rename from compiler/test/dotc/pos-init-global-scala2-library-tasty.blacklist rename to compiler/test/dotc/pos-init-global-scala2-library-tasty.excludelist diff --git a/compiler/test/dotc/pos-test-pickling.blacklist b/compiler/test/dotc/pos-test-pickling.excludelist similarity index 100% rename from compiler/test/dotc/pos-test-pickling.blacklist rename to compiler/test/dotc/pos-test-pickling.excludelist diff --git a/compiler/test/dotc/run-from-tasty.blacklist b/compiler/test/dotc/run-from-tasty.excludelist similarity index 100% rename from compiler/test/dotc/run-from-tasty.blacklist rename to compiler/test/dotc/run-from-tasty.excludelist diff --git a/compiler/test/dotc/run-macros-scala2-library-tasty.blacklist b/compiler/test/dotc/run-macros-scala2-library-tasty.excludelist similarity index 100% rename from compiler/test/dotc/run-macros-scala2-library-tasty.blacklist rename to compiler/test/dotc/run-macros-scala2-library-tasty.excludelist diff --git a/compiler/test/dotc/run-test-pickling.blacklist b/compiler/test/dotc/run-test-pickling.excludelist similarity index 100% rename from compiler/test/dotc/run-test-pickling.blacklist rename to compiler/test/dotc/run-test-pickling.excludelist diff --git a/compiler/test/dotty/tools/TestSources.scala b/compiler/test/dotty/tools/TestSources.scala index b2133b2fb182..a2fccd3b35e6 100644 --- a/compiler/test/dotty/tools/TestSources.scala +++ b/compiler/test/dotty/tools/TestSources.scala @@ -12,65 +12,65 @@ object TestSources { // pos tests lists - def posFromTastyBlacklistFile: String = "compiler/test/dotc/pos-from-tasty.blacklist" - def posTestPicklingBlacklistFile: String = "compiler/test/dotc/pos-test-pickling.blacklist" + def posFromTastyExcludelistFile: String = "compiler/test/dotc/pos-from-tasty.excludelist" + def posTestPicklingExcludelistFile: String = "compiler/test/dotc/pos-test-pickling.excludelist" def posTestRecheckExcludesFile: String = "compiler/test/dotc/pos-test-recheck.excludes" def posLazyValsAllowlistFile: String = "compiler/test/dotc/pos-lazy-vals-tests.allowlist" def posLintingAllowlistFile: String = "compiler/test/dotc/pos-linting.allowlist" - def posInitGlobalScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/pos-init-global-scala2-library-tasty.blacklist" + def posInitGlobalScala2LibraryTastyExcludelistFile: String = "compiler/test/dotc/pos-init-global-scala2-library-tasty.excludelist" - def posFromTastyBlacklisted: List[String] = loadList(posFromTastyBlacklistFile) - def posTestPicklingBlacklisted: List[String] = loadList(posTestPicklingBlacklistFile) + def posFromTastyExcludelisted: List[String] = loadList(posFromTastyExcludelistFile) + def posTestPicklingExcludelisted: List[String] = loadList(posTestPicklingExcludelistFile) def posTestRecheckExcluded: List[String] = loadList(posTestRecheckExcludesFile) def posLazyValsAllowlist: List[String] = loadList(posLazyValsAllowlistFile) def posLintingAllowlist: List[String] = loadList(posLintingAllowlistFile) - def posInitGlobalScala2LibraryTastyBlacklisted: List[String] = - if Properties.usingScalaLibraryTasty then loadList(posInitGlobalScala2LibraryTastyBlacklistFile) + def posInitGlobalScala2LibraryTastyExcludelisted: List[String] = + if Properties.usingScalaLibraryTasty then loadList(posInitGlobalScala2LibraryTastyExcludelistFile) else Nil // run tests lists - def runFromTastyBlacklistFile: String = "compiler/test/dotc/run-from-tasty.blacklist" - def runTestPicklingBlacklistFile: String = "compiler/test/dotc/run-test-pickling.blacklist" + def runFromTastyExcludelistFile: String = "compiler/test/dotc/run-from-tasty.excludelist" + def runTestPicklingExcludelistFile: String = "compiler/test/dotc/run-test-pickling.excludelist" def runTestRecheckExcludesFile: String = "compiler/test/dotc/run-test-recheck.excludes" def runLazyValsAllowlistFile: String = "compiler/test/dotc/run-lazy-vals-tests.allowlist" - def runMacrosScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/run-macros-scala2-library-tasty.blacklist" + def runMacrosScala2LibraryTastyExcludelistFile: String = "compiler/test/dotc/run-macros-scala2-library-tasty.excludelist" - def runFromTastyBlacklisted: List[String] = loadList(runFromTastyBlacklistFile) - def runTestPicklingBlacklisted: List[String] = loadList(runTestPicklingBlacklistFile) + def runFromTastyExcludelisted: List[String] = loadList(runFromTastyExcludelistFile) + def runTestPicklingExcludelisted: List[String] = loadList(runTestPicklingExcludelistFile) def runTestRecheckExcluded: List[String] = loadList(runTestRecheckExcludesFile) def runLazyValsAllowlist: List[String] = loadList(runLazyValsAllowlistFile) - def runMacrosScala2LibraryTastyBlacklisted: List[String] = - if Properties.usingScalaLibraryTasty then loadList(runMacrosScala2LibraryTastyBlacklistFile) + def runMacrosScala2LibraryTastyExcludelisted: List[String] = + if Properties.usingScalaLibraryTasty then loadList(runMacrosScala2LibraryTastyExcludelistFile) else Nil // neg tests lists - def negScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/neg-scala2-library-tasty.blacklist" - def negInitGlobalScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/neg-init-global-scala2-library-tasty.blacklist" + def negScala2LibraryTastyExcludelistFile: String = "compiler/test/dotc/neg-scala2-library-tasty.excludelist" + def negInitGlobalScala2LibraryTastyExcludelistFile: String = "compiler/test/dotc/neg-init-global-scala2-library-tasty.excludelist" - def negScala2LibraryTastyBlacklisted: List[String] = - if Properties.usingScalaLibraryTasty then loadList(negScala2LibraryTastyBlacklistFile) + def negScala2LibraryTastyExcludelisted: List[String] = + if Properties.usingScalaLibraryTasty then loadList(negScala2LibraryTastyExcludelistFile) else Nil - def negInitGlobalScala2LibraryTastyBlacklisted: List[String] = - if Properties.usingScalaLibraryTasty then loadList(negInitGlobalScala2LibraryTastyBlacklistFile) + def negInitGlobalScala2LibraryTastyExcludelisted: List[String] = + if Properties.usingScalaLibraryTasty then loadList(negInitGlobalScala2LibraryTastyExcludelistFile) else Nil // patmat tests lists - def patmatExhaustivityScala2LibraryTastyBlacklistFile: String = "compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.blacklist" + def patmatExhaustivityScala2LibraryTastyExcludelistFile: String = "compiler/test/dotc/patmat-exhaustivity-scala2-library-tasty.excludelist" - def patmatExhaustivityScala2LibraryTastyBlacklisted: List[String] = - if Properties.usingScalaLibraryTasty then loadList(patmatExhaustivityScala2LibraryTastyBlacklistFile) + def patmatExhaustivityScala2LibraryTastyExcludelisted: List[String] = + if Properties.usingScalaLibraryTasty then loadList(patmatExhaustivityScala2LibraryTastyExcludelistFile) else Nil // neg best effort tests lists - def negBestEffortPicklingBlacklistFile: String = "compiler/test/dotc/neg-best-effort-pickling.blacklist" - def negBestEffortUnpicklingBlacklistFile: String = "compiler/test/dotc/neg-best-effort-unpickling.blacklist" + def negBestEffortPicklingExcludelistFile: String = "compiler/test/dotc/neg-best-effort-pickling.excludelist" + def negBestEffortUnpicklingExcludelistFile: String = "compiler/test/dotc/neg-best-effort-unpickling.excludelist" - def negBestEffortPicklingBlacklisted: List[String] = loadList(negBestEffortPicklingBlacklistFile) - def negBestEffortUnpicklingBlacklisted: List[String] = loadList(negBestEffortUnpicklingBlacklistFile) + def negBestEffortPicklingExcludelisted: List[String] = loadList(negBestEffortPicklingExcludelistFile) + def negBestEffortUnpicklingExcludelisted: List[String] = loadList(negBestEffortUnpicklingExcludelistFile) // load lists diff --git a/compiler/test/dotty/tools/dotc/BestEffortOptionsTests.scala b/compiler/test/dotty/tools/dotc/BestEffortOptionsTests.scala index 1e7262f5fd8d..da5440331068 100644 --- a/compiler/test/dotty/tools/dotc/BestEffortOptionsTests.scala +++ b/compiler/test/dotty/tools/dotc/BestEffortOptionsTests.scala @@ -28,8 +28,8 @@ class BestEffortOptionsTests { implicit val testGroup: TestGroup = TestGroup("negTestFromBestEffortTasty") compileBestEffortTastyInDir(s"tests${JFile.separator}neg", bestEffortBaselineOptions, - picklingFilter = FileFilter.exclude(TestSources.negBestEffortPicklingBlacklisted), - unpicklingFilter = FileFilter.exclude(TestSources.negBestEffortUnpicklingBlacklisted) + picklingFilter = FileFilter.exclude(TestSources.negBestEffortPicklingExcludelisted), + unpicklingFilter = FileFilter.exclude(TestSources.negBestEffortUnpicklingExcludelisted) ).checkNoCrash() } diff --git a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala index 3b19f1d3d4bb..23980508f17d 100644 --- a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala @@ -113,7 +113,7 @@ class BootstrappedOnlyCompilationTests { @Test def runMacros: Unit = { implicit val testGroup: TestGroup = TestGroup("runMacros") - compileFilesInDir("tests/run-macros", defaultOptions.and("-Xcheck-macros"), FileFilter.exclude(TestSources.runMacrosScala2LibraryTastyBlacklisted)) + compileFilesInDir("tests/run-macros", defaultOptions.and("-Xcheck-macros"), FileFilter.exclude(TestSources.runMacrosScala2LibraryTastyExcludelisted)) .checkRuns() } diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 2c42204a4b4d..b854dcf5621f 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -139,7 +139,7 @@ class CompilationTests { @Test def negAll: Unit = { implicit val testGroup: TestGroup = TestGroup("compileNeg") aggregateTests( - compileFilesInDir("tests/neg", defaultOptions, FileFilter.exclude(TestSources.negScala2LibraryTastyBlacklisted)), + compileFilesInDir("tests/neg", defaultOptions, FileFilter.exclude(TestSources.negScala2LibraryTastyExcludelisted)), compileFilesInDir("tests/neg-deep-subtype", allowDeepSubtypes), compileFilesInDir("tests/neg-custom-args/captures", defaultOptions.and("-language:experimental.captureChecking")), compileFile("tests/neg-custom-args/sourcepath/outer/nested/Test1.scala", defaultOptions.and("-sourcepath", "tests/neg-custom-args/sourcepath")), @@ -182,8 +182,8 @@ class CompilationTests { @Test def pickling: Unit = { implicit val testGroup: TestGroup = TestGroup("testPickling") aggregateTests( - compileFilesInDir("tests/pos", picklingOptions, FileFilter.exclude(TestSources.posTestPicklingBlacklisted)), - compileFilesInDir("tests/run", picklingOptions, FileFilter.exclude(TestSources.runTestPicklingBlacklisted)) + compileFilesInDir("tests/pos", picklingOptions, FileFilter.exclude(TestSources.posTestPicklingExcludelisted)), + compileFilesInDir("tests/run", picklingOptions, FileFilter.exclude(TestSources.runTestPicklingExcludelisted)) ).checkCompile() } @@ -228,8 +228,8 @@ class CompilationTests { // initialization tests @Test def checkInitGlobal: Unit = { implicit val testGroup: TestGroup = TestGroup("checkInitGlobal") - compileFilesInDir("tests/init-global/warn", defaultOptions.and("-Ysafe-init-global"), FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyBlacklisted)).checkWarnings() - compileFilesInDir("tests/init-global/pos", defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings"), FileFilter.exclude(TestSources.posInitGlobalScala2LibraryTastyBlacklisted)).checkCompile() + compileFilesInDir("tests/init-global/warn", defaultOptions.and("-Ysafe-init-global"), FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyExcludelisted)).checkWarnings() + compileFilesInDir("tests/init-global/pos", defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings"), FileFilter.exclude(TestSources.posInitGlobalScala2LibraryTastyExcludelisted)).checkCompile() } // initialization tests diff --git a/compiler/test/dotty/tools/dotc/FromTastyTests.scala b/compiler/test/dotty/tools/dotc/FromTastyTests.scala index 1d46cbbce95c..874088fb618e 100644 --- a/compiler/test/dotty/tools/dotc/FromTastyTests.scala +++ b/compiler/test/dotty/tools/dotc/FromTastyTests.scala @@ -23,7 +23,7 @@ class FromTastyTests { implicit val testGroup: TestGroup = TestGroup("posTestFromTasty") compileTastyInDir(s"tests${JFile.separator}pos", defaultOptions, - fromTastyFilter = FileFilter.exclude(TestSources.posFromTastyBlacklisted) + fromTastyFilter = FileFilter.exclude(TestSources.posFromTastyExcludelisted) ).checkCompile() } @@ -35,7 +35,7 @@ class FromTastyTests { implicit val testGroup: TestGroup = TestGroup("runTestFromTasty") compileTastyInDir(s"tests${JFile.separator}run", defaultOptions, - fromTastyFilter = FileFilter.exclude(TestSources.runFromTastyBlacklisted) + fromTastyFilter = FileFilter.exclude(TestSources.runFromTastyExcludelisted) ).checkRuns() } } diff --git a/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala b/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala index 659cd27e62f4..9f78d0778b41 100644 --- a/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala +++ b/compiler/test/dotty/tools/dotc/parsing/ScannerTest.scala @@ -10,7 +10,7 @@ import org.junit.Test class ScannerTest extends DottyTest { - val blackList = List( + val excluded = List( "/scaladoc/scala/tools/nsc/doc/html/page/Index.scala", "/scaladoc/scala/tools/nsc/doc/html/page/Template.scala" ) @@ -33,13 +33,13 @@ class ScannerTest extends DottyTest { def scanDir(path: String): Unit = scanDir(Directory(path)) def scanDir(dir: Directory): Unit = { - if (blackList exists (dir.jpath.toString endsWith _)) - println(s"blacklisted package: ${dir.toAbsolute.jpath}") + if (excluded exists (dir.jpath.toString endsWith _)) + println(s"excluded package: ${dir.toAbsolute.jpath}") else for (f <- dir.files) if (f.name.endsWith(".scala")) - if (blackList exists (f.jpath.toString endsWith _)) - println(s"blacklisted file: ${f.toAbsolute.jpath}") + if (excluded exists (f.jpath.toString endsWith _)) + println(s"excluded file: ${f.toAbsolute.jpath}") else scan(new PlainFile(f)) for (d <- dir.dirs) diff --git a/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala b/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala index 4ed59db5c10e..7c6a27ea7422 100644 --- a/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala +++ b/compiler/test/dotty/tools/dotc/transform/PatmatExhaustivityTest.scala @@ -63,14 +63,14 @@ class PatmatExhaustivityTest { @Test def patmatExhaustivity: Unit = { - val blacklisted = TestSources.patmatExhaustivityScala2LibraryTastyBlacklisted.toSet + val excluded = TestSources.patmatExhaustivityScala2LibraryTastyExcludelisted.toSet val res = Directory(testsDir).list.toList .filter(f => f.ext.isScala || f.isDirectory) .filter { f => val path = if f.isDirectory then f.path + "/" else f.path Properties.testsFilter.isEmpty || Properties.testsFilter.exists(path.contains) } - .filterNot(f => blacklisted.contains(f.name)) + .filterNot(f => excluded.contains(f.name)) .map(f => if f.isDirectory then compileDir(f.jpath) else compileFile(f.jpath)) val failed = res.filter(!_) diff --git a/compiler/test/dotty/tools/vulpix/FileFilter.scala b/compiler/test/dotty/tools/vulpix/FileFilter.scala index b2aef8af038e..b59b4d4f209d 100644 --- a/compiler/test/dotty/tools/vulpix/FileFilter.scala +++ b/compiler/test/dotty/tools/vulpix/FileFilter.scala @@ -11,13 +11,13 @@ object FileFilter { exclude(file :: files.toList) def exclude(files: List[String]): FileFilter = new FileFilter { - private val blackList = files.toSet - def accept(file: String): Boolean = !blackList.contains(file) + private val excluded = files.toSet + def accept(file: String): Boolean = !excluded.contains(file) } def include(files: List[String]): FileFilter = new FileFilter { - private val whiteList = files.toSet - def accept(file: String): Boolean = whiteList.contains(file) + private val included = files.toSet + def accept(file: String): Boolean = included.contains(file) } object NoFilter extends FileFilter { diff --git a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala index 29e64163b833..7827b94e165a 100644 --- a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala +++ b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala @@ -1585,7 +1585,7 @@ trait ParallelTesting extends RunnerOrchestration { self => | | 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.blacklist` + |This tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}$runOrPos-$listName.excludelist` | |""".stripMargin } @@ -1640,7 +1640,7 @@ trait ParallelTesting extends RunnerOrchestration { self => | | sbt "scalac $bestEffortFlag $semanticDbFlag $file" | - |These tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}neg-best-effort-pickling.blacklist` + |These tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}neg-best-effort-pickling.excludelist` |""".stripMargin } } @@ -1667,7 +1667,7 @@ trait ParallelTesting extends RunnerOrchestration { self => | sbt "scalac -Ybest-effort $file" | sbt "scalac --from-tasty -Ywith-best-effort-tasty $beTastyFilesString" | - |These tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}neg-best-effort-unpickling.blacklist` + |These tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}neg-best-effort-unpickling.excludelist` | |""".stripMargin } diff --git a/docs/_docs/internals/best-effort-compilation.md b/docs/_docs/internals/best-effort-compilation.md index 248203883a3c..a897aae49e6e 100644 --- a/docs/_docs/internals/best-effort-compilation.md +++ b/docs/_docs/internals/best-effort-compilation.md @@ -87,5 +87,5 @@ the previously created Best Effort TASTy, with `-Yread-tasty` and `-Ywith-best-e TreeUnpickler for those Best Effort TASTy files. 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 -overall development of the compiler. Because of that, the tests can be freely disabled in `compiler/neg-best-effort.blacklist` -(testing TreePickler) and `compiler/neg-best-effort-from-tasty.blacklist` (testing TreeUnpickler). +overall development of the compiler. Because of that, the tests can be freely disabled in `compiler/neg-best-effort.excludelist` +(testing TreePickler) and `compiler/neg-best-effort-from-tasty.excludelist` (testing TreeUnpickler). diff --git a/project/Build.scala b/project/Build.scala index b67974f4405d..d21f99e38680 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -1709,7 +1709,7 @@ object Build { ) }, - // A first blacklist of tests for those that do not compile or do not link + // A first excludelist of tests for those that do not compile or do not link (Test / managedSources) ++= { val dir = fetchScalaJSSource.value / "test-suite" diff --git a/scaladoc/src/dotty/tools/scaladoc/tasty/BasicSupport.scala b/scaladoc/src/dotty/tools/scaladoc/tasty/BasicSupport.scala index a5e32c7332bd..81415377beeb 100644 --- a/scaladoc/src/dotty/tools/scaladoc/tasty/BasicSupport.scala +++ b/scaladoc/src/dotty/tools/scaladoc/tasty/BasicSupport.scala @@ -42,7 +42,7 @@ trait BasicSupport: def getAnnotations(): List[Annotation] = // Custom annotations should be documented only if annotated by @java.lang.annotation.Documented // We allow also some special cases - val fqNameWhitelist = Set( + val fqNameAllowlist = Set( "scala.specialized", "scala.throws", "scala.transient", @@ -56,7 +56,7 @@ trait BasicSupport: ) val documentedSymbol = summon[Quotes].reflect.Symbol.requiredClass("java.lang.annotation.Documented") val annotations = sym.annotations.filter { a => - a.tpe.typeSymbol.hasAnnotation(documentedSymbol) || fqNameWhitelist.contains(a.symbol.fullName) + a.tpe.typeSymbol.hasAnnotation(documentedSymbol) || fqNameAllowlist.contains(a.symbol.fullName) } annotations.map(parseAnnotation).reverse