Skip to content

Commit 36237cb

Browse files
authored
Merge pull request #1880 from dotty-staging/improve-whitelist-infrastructure
Improve whitelist infrastructure.
2 parents ba7e129 + 783a80d commit 36237cb

File tree

6 files changed

+92
-705
lines changed

6 files changed

+92
-705
lines changed

bench/test/dotty/tools/benchmarks/Benchmarks.scala

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package dotty.tools.benchmarks
22

3+
import dotty.tools.StdLibSources
34
import org.scalameter.Key.reports._
45
import org.scalameter.PerformanceTest.OnlineRegressionReport
56
import org.scalameter.api._
@@ -49,13 +50,7 @@ object BenchTests extends OnlineRegressionReport {
4950
val dottyDir = "../compiler/src/dotty/"
5051
val testDir = "../bench/tests/"
5152

52-
val stdlibFiles = Source.fromFile("../compiler/test/dotc/scala-collections.whitelist", "UTF8").getLines()
53-
.map(_.trim) // allow identation
54-
.filter(!_.startsWith("#")) // allow comment lines prefixed by #
55-
.map(_.takeWhile(_ != '#').trim) // allow comments in the end of line
56-
.filter(_.nonEmpty)
57-
.map("." + _)
58-
.toList
53+
val stdlibFiles = StdLibSources.whitelisted
5954

6055
def stdLib = compiler.compileList("compileStdLib", stdlibFiles, "-migration" :: scala2mode)
6156

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,83 @@
11
## Errors having to do with bootstrap
22

3-
../scala-scala/src/library/scala/Function1.scala
4-
../scala-scala/src/library/scala/Function2.scala
3+
scala/Function1.scala
4+
scala/Function2.scala
55
# Cyclic reference because of @specialized annotation
66

77

88
## Errors having to do with deep subtypes
99

10-
../scala-scala/src/library/scala/collection/generic/ParSetFactory.scala
10+
scala/collection/generic/ParSetFactory.scala
1111
# This gives a deep subtype violation when run with the rest of the whitelist.
1212
# Works without -Yno-deep-subtypes, though.
1313

14-
../scala-scala/src/library/scala/collection/parallel/mutable/ParMap.scala
14+
scala/collection/parallel/mutable/ParMap.scala
1515
# -Yno-deep-subtypes fails
1616

17-
../scala-scala/src/library/scala/collection/parallel/ParMap.scala
17+
scala/collection/parallel/ParMap.scala
1818
# -Yno-deep-subtypes fails
1919

20-
../scala-scala/src/library/scala/collection/parallel/ParMapLike.scala
20+
scala/collection/parallel/ParMapLike.scala
2121
# -Yno-deep-subtypes fails
2222

2323

2424

2525
## Ycheck failures, presumably linked to TailCalls
2626

27-
../scala-scala/src/library/scala/collection/parallel/ParIterableLike.scala
27+
scala/collection/parallel/ParIterableLike.scala
2828
# -Ycheck:classOf fails
2929

30-
../scala-scala/src/library/scala/collection/parallel/ParSeqLike.scala
30+
scala/collection/parallel/ParSeqLike.scala
3131
# -Ycheck:classOf fails
3232

33-
../scala-scala/src/library/scala/util/control/TailCalls.scala
33+
scala/util/control/TailCalls.scala
3434
# -Ycheck:classOf fails
3535

3636

3737

3838
## Errors having to do with unavailable APIs or language features:
3939

40-
../scala-scala/src/library/scala/reflect/ClassManifestDeprecatedApis.scala
40+
scala/reflect/ClassManifestDeprecatedApis.scala
4141
# 51 | import Manifest._
4242
# | ^^^^^^^^
4343
# | not found: Manifest
4444

45-
../scala-scala/src/library/scala/reflect/ClassTag.scala
45+
scala/reflect/ClassTag.scala
4646
# 124 | val Short : ClassTag[scala.Short] = Manifest.Short
4747
# | ^^^^^^^^
4848
# | not found: Manifest
4949

50-
../scala-scala/src/library/scala/reflect/Manifest.scala
50+
scala/reflect/Manifest.scala
5151
# 104 | private def readResolve(): Any = Manifest.Short
5252
# | ^^^^^^^^
5353
# | not found: Manifest
5454

55-
../scala-scala/src/library/scala/text/Document.scala
55+
scala/text/Document.scala
5656
# Lots of type errors for pattern matches, having to do with the fact
5757
# that Document contains a :: method without corresponding extractor,
5858
# but still wants to extract lists using ::. We won't support that.
5959
# Since Document should have been removed already, let's ignore it.
6060

61-
../scala-scala/src/library/scala/AnyVal.scala
61+
scala/AnyVal.scala
6262
# 55 |abstract class AnyVal extends Any {
6363
# |^
6464
# |illegal redefinition of standard class AnyVal
6565
# (This is intended)
6666

67-
../scala-scala/src/library/scala/collection/parallel/Tasks.scala
67+
scala/collection/parallel/Tasks.scala
6868
# java.lang.StackOverflowError
6969

70-
../scala-scala/src/library/scala/reflect/package.scala
70+
scala/reflect/package.scala
7171
# 63 | private[scala] def materializeClassTag[T](): ClassTag[T] = macro ???
7272
# | ^^^^^
7373
# | not found: macro
7474

75-
../scala-scala/src/library/scala/StringContext.scala
75+
scala/StringContext.scala
7676
# 168 | def f[A >: Any](args: A*): String = macro ???
7777
# | ^^^^^
7878
# | not found: macro
7979

80-
../scala-scala/src/library/scala/util/control/Exception.scala
80+
scala/util/control/Exception.scala
8181
# 51 | implicit def throwableSubtypeToCatcher[Ex <: Throwable: ClassTag, T](pf: PartialFunction[Ex, T]) =
8282
# | ^
8383
# | cyclic reference involving method mkCatcher

0 commit comments

Comments
 (0)