From 7bef54de2fcdb5585031c2d6a81952659f4e5d7c Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 18 Dec 2014 10:55:11 +0100 Subject: -Ylog:X now only log phase X, use -Ylog:X+ to also log phase X+1 --- src/dotty/tools/dotc/reporting/Reporter.scala | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/dotty/tools/dotc/reporting/Reporter.scala') diff --git a/src/dotty/tools/dotc/reporting/Reporter.scala b/src/dotty/tools/dotc/reporting/Reporter.scala index dc6d8c6ab..41f007e66 100644 --- a/src/dotty/tools/dotc/reporting/Reporter.scala +++ b/src/dotty/tools/dotc/reporting/Reporter.scala @@ -101,16 +101,12 @@ trait Reporting { this: Context => def incompleteInputError(msg: String, pos: SourcePosition = NoSourcePosition)(implicit ctx: Context): Unit = reporter.incomplete(new Error(msg, pos))(ctx) - /** Log msg if current phase or its precedessor is mentioned in - * settings.log. - * The reason we also pick the predecessor is that during the - * tree transform of phase X, we often are already in phase X+1. - * It's convenient to have logging work independently of whether - * we have advanced the phase or not. + /** Log msg if settings.log contains the current phase. + * See [[config.CompilerCommand#explainAdvanced]] for the exact meaning of + * "contains" here. */ def log(msg: => String): Unit = - if (this.settings.log.value.containsPhase(phase) || - this.settings.log.value.containsPhase(phase.prev)) + if (this.settings.log.value.containsPhase(phase)) echo(s"[log ${ctx.phasesStack.reverse.mkString(" -> ")}] $msg") def debuglog(msg: => String): Unit = -- cgit v1.2.3