* 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.

* Change to add a new BuildMode hint category and keep testament in sync
as per comment.

* Add "--hint:buildmode:off" to `defaultHintsOff`.

* Remove as requested.

* As requested for tests clean up.

* Address code review.

* Address code review.

* Mirror db456423116a9b19666f551f4d38aded3964c2e2
This commit is contained in:
c-blake 2021-04-29 02:55:43 -04:00 • committed by GitHub
commit 601c050fcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 13 deletions

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
@ -406,10 +406,10 @@ proc mainCommand*(graph: ModuleGraph) =
"loc", loc,
"sec", sec,
"mem", mem,
"build", build,
"project", project,
"output", output,
])
rawMessage(conf, hintBuildMode, build)
when PrintRopeCacheStats:
echo "rope cache stats: "