mirror of https://github.com/sbt/sbt.git
Merge pull request #4965 from eed3si9n/wip/stacktrace3
reimplement stack trace suppression
This commit is contained in:
commit
cd00d0f801
|
|
@ -12,7 +12,6 @@ import java.io.PrintWriter
|
|||
import Def.ScopedKey
|
||||
import Scope.GlobalScope
|
||||
import Keys.{ logLevel, logManager, persistLogLevel, persistTraceLevel, sLog, traceLevel }
|
||||
import scala.Console.{ BLUE, RESET }
|
||||
import sbt.internal.util.{
|
||||
AttributeKey,
|
||||
ConsoleAppender,
|
||||
|
|
@ -177,9 +176,14 @@ object LogManager {
|
|||
val display = Project.showContextKey(state)
|
||||
def commandBase = "last " + display.show(unwrapStreamsKey(key))
|
||||
def command(useFormat: Boolean) =
|
||||
if (useFormat) BLUE + commandBase + RESET else s"'$commandBase'"
|
||||
context =>
|
||||
Some("Stack trace suppressed: run %s for the full output.".format(command(context.useFormat)))
|
||||
if (useFormat) s"${scala.Console.MAGENTA}$commandBase${scala.Console.RESET}"
|
||||
else s"'$commandBase'"
|
||||
|
||||
{ context =>
|
||||
Some(
|
||||
s"stack trace is suppressed; run ${command(context.useFormat)} for the full output"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
def unwrapStreamsKey(key: ScopedKey[_]): ScopedKey[_] = key.scope.task match {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ object Dependencies {
|
|||
|
||||
// sbt modules
|
||||
private val ioVersion = nightlyVersion.getOrElse("1.3.0-M16")
|
||||
private val utilVersion = nightlyVersion.getOrElse("1.3.0-M9")
|
||||
private val utilVersion = nightlyVersion.getOrElse("1.3.0-M10")
|
||||
private val lmVersion =
|
||||
sys.props.get("sbt.build.lm.version") match {
|
||||
case Some(version) => version
|
||||
|
|
|
|||
Loading…
Reference in New Issue