Skip to content

Commit 4961709

Browse files
authored
Merge pull request #2347 from dotty-staging/topic/stop-after-pickler
Enforce `-Ystop-after:pickler` on `-Ytest-pickler`
2 parents de53e52 + 2eff71a commit 4961709

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

compiler/src/dotty/tools/dotc/Run.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,14 @@ class Run(comp: Compiler)(implicit ctx: Context) {
6666

6767
protected def compileUnits() = Stats.monitorHeartBeat {
6868
ctx.checkSingleThreaded()
69+
70+
// If testing pickler, make sure to stop after pickling phase:
71+
val stopAfter =
72+
if (ctx.settings.YtestPickler.value) List("pickler")
73+
else ctx.settings.YstopAfter.value
74+
6975
val phases = ctx.squashPhases(ctx.phasePlan,
70-
ctx.settings.Yskip.value, ctx.settings.YstopBefore.value, ctx.settings.YstopAfter.value, ctx.settings.Ycheck.value)
76+
ctx.settings.Yskip.value, ctx.settings.YstopBefore.value, stopAfter, ctx.settings.Ycheck.value)
7177
ctx.usePhases(phases)
7278
var lastPrintedTree: PrintedTree = NoPrintedTree
7379
for (phase <- ctx.allPhases)

compiler/test/dotty/tools/vulpix/TestConfiguration.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ object TestConfiguration {
5858
val picklingOptions = defaultOptions ++ Array(
5959
"-Xprint-types",
6060
"-Ytest-pickler",
61-
"-Ystop-after:pickler",
6261
"-Yprintpos"
6362
)
6463
val scala2Mode = defaultOptions ++ Array("-language:Scala2")

0 commit comments

Comments
 (0)