Skip to content

Commit b62d712

Browse files
committed
Hide "Parallelize position pickling" under a flag.
This disables #9619 as it lead to CI failures.
1 parent 0246f72 commit b62d712

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ class ScalaSettings extends Settings.SettingGroup {
146146
val YshowPrintErrors: Setting[Boolean] = BooleanSetting("-Yshow-print-errors", "Don't suppress exceptions thrown during tree printing.")
147147
val YshowRawQuoteTrees: Setting[Boolean] = BooleanSetting("-Yshow-raw-tree", "Don't remove quote artifacts.")
148148
val YtestPickler: Setting[Boolean] = BooleanSetting("-Ytest-pickler", "Self-test for pickling functionality; should be used with -Ystop-after:pickler.")
149+
val YparallelPickler: Setting[Boolean] = BooleanSetting("-Yparallel-pickler", "Run part of the pickling phase in parallel, disable because it breaks some tests.")
149150
val YcheckReentrant: Setting[Boolean] = BooleanSetting("-Ycheck-reentrant", "Check that compiled program does not contain vars that can be accessed from a global root.")
150151
val YdropComments: Setting[Boolean] = BooleanSetting("-Ydrop-comments", "Drop comments when scanning source files.")
151152
val YcookComments: Setting[Boolean] = BooleanSetting("-Ycook-comments", "Cook the comments (type check `@usecase`, etc.)")

compiler/src/dotty/tools/dotc/transform/Pickler.scala

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,17 @@ class Pickler extends Phase {
8686
pickled
8787
}(using ExecutionContext.global)
8888
def force(): Array[Byte] = Await.result(pickledF, Duration.Inf)
89-
if ctx.settings.YtestPickler.value then force()
89+
90+
// Turn off parallelism because it lead to non-deterministic CI failures:
91+
// - https://github.com/lampepfl/dotty/runs/1029579877?check_suite_focus=true#step:10:967
92+
// - https://github.com/lampepfl/dotty/runs/1027582846?check_suite_focus=true#step:10:564
93+
//
94+
// Turning off parallelism in -Ytest-pickler and Interactive mode seems to
95+
// work around the problem but I would prefer to not enable this at all
96+
// until the root cause of the issue is understood since it might manifest
97+
// itself in other situations too.
98+
if !ctx.settings.YparallelPickler.value then force()
99+
90100
unit.pickled += (cls -> force)
91101
}
92102
}

0 commit comments

Comments
 (0)