Skip to content

Commit b33babc

Browse files
committed
Do not use the plain printer with -Ydebug
Instead, a new setting called -Yplain-printer is used for this. After this commit, we can now run all tests with -Ydebug (this was not the case before because using the plain printer breaks -Ytest-pickler)
1 parent 4d98882 commit b33babc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ class ScalaSettings extends Settings.SettingGroup {
151151
val Yheartbeat = BooleanSetting("-Yheartbeat", "show heartbeat stack trace of compiler operations.")
152152
val Yprintpos = BooleanSetting("-Yprintpos", "show tree positions.")
153153
val YnoDeepSubtypes = BooleanSetting("-Yno-deep-subtypes", "throw an exception on deep subtyping call stacks.")
154+
val YplainPrinter = BooleanSetting("-Yplain-printer", "Pretty-print using a plain printer.")
154155
val YprintSyms = BooleanSetting("-Yprint-syms", "when printing trees print info in symbols instead of corresponding info in trees.")
155156
val YtestPickler = BooleanSetting("-Ytest-pickler", "self-test for pickling functionality; should be used with -Ystop-after:pickler")
156157
val YcheckReentrant = BooleanSetting("-Ycheck-reentrant", "check that compiled program does not contain vars that can be accessed from a global root.")

src/dotty/tools/dotc/printing/Printers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ trait Printers { this: Context =>
88
/** A function creating a printer */
99
def printer = {
1010
val pr = printerFn(this)
11-
if (this.debug) pr.plain else pr
11+
if (this.settings.YplainPrinter.value) pr.plain else pr
1212
}
1313
}
1414

0 commit comments

Comments
 (0)