`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:
Charles Blake
2021-04-27 06:47:09 -04:00
parent a236002e54
commit 6dafc5a0ae
3 changed files with 8 additions and 7 deletions

View File

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

View File

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

View File

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