Merge pull request #4965 from eed3si9n/wip/stacktrace3

reimplement stack trace suppression
This commit is contained in:
eugene yokota 2019-08-20 14:44:36 -04:00 committed by GitHub
commit cd00d0f801
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -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 {

View File

@ -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