mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-03 02:18:00 +00:00
Implement https://forum.nim-lang.org/t/7848#50018 with just the same
`SuccessX` hint category, build mode on a separate, final line, and no change to how the mode is spelled for -d:release/-d:danger.
This commit is contained in:
@@ -142,7 +142,8 @@ const
|
||||
warnUser: "$1",
|
||||
hintSuccess: "operation successful: $#",
|
||||
# keep in sync with `testament.isSuccess`
|
||||
hintSuccessX: "${loc} lines; ${sec}s; $mem; $build build; proj: $project; out: $output",
|
||||
hintSuccessX: """$loc lines; ${sec}s; $mem; proj: $project; out: $output
|
||||
$build""",
|
||||
hintCC: "CC: $1",
|
||||
hintLineTooLong: "line too long",
|
||||
hintXDeclaredButNotUsed: "'$1' is declared but not used",
|
||||
|
||||
@@ -384,9 +384,9 @@ proc mainCommand*(graph: ModuleGraph) =
|
||||
when declared(system.getMaxMem): formatSize(getMaxMem()) & " peakmem"
|
||||
else: formatSize(getTotalMem()) & " totmem"
|
||||
let loc = $conf.linesCompiled
|
||||
let build = if isDefined(conf, "danger"): "Dangerous Release"
|
||||
elif isDefined(conf, "release"): "Release"
|
||||
else: "Debug"
|
||||
let build = if isDefined(conf, "danger"): "Dangerous Release build"
|
||||
elif isDefined(conf, "release"): "Release build"
|
||||
else: "***SLOW, DEBUG BUILD***; -d:release makes code run faster."
|
||||
let sec = formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3)
|
||||
let project = if conf.filenameOption == foAbs: $conf.projectFull else: $conf.projectName
|
||||
# xxx honor conf.filenameOption more accurately
|
||||
|
||||
@@ -1210,9 +1210,9 @@ proc mainCommand(graph: ModuleGraph) =
|
||||
when declared(system.getMaxMem): formatSize(getMaxMem()) & " peakmem"
|
||||
else: formatSize(getTotalMem()) & " totmem"
|
||||
let loc = $conf.linesCompiled
|
||||
let build = if isDefined(conf, "danger"): "Dangerous Release"
|
||||
elif isDefined(conf, "release"): "Release"
|
||||
else: "Debug"
|
||||
let build = if isDefined(conf, "danger"): "Dangerous Release build"
|
||||
elif isDefined(conf, "release"): "Release build"
|
||||
else: "***SLOW, DEBUG BUILD***; -d:release makes code run faster."
|
||||
let sec = formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3)
|
||||
let project = if conf.filenameOption == foAbs: $conf.projectFull else: $conf.projectName
|
||||
rawMessage(conf, hintSuccessX, [
|
||||
|
||||
Reference in New Issue
Block a user