--filenames:abs|canonical|legacyRelProj for filenames in compiler msgs (replaces --listfullpaths:on|off) (#17746)

* use canonicalImport for filename_magicSauce
* --filenames:abs|canonical|magic
* rename: magic => legacyRelProj
This commit is contained in:
Timothee Cour 2021-04-21 06:26:27 -07:00 • committed by GitHub
commit da1c1a7117
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 72 additions and 41 deletions

View file

@ -1205,6 +1205,7 @@ proc mainCommand(graph: ModuleGraph) =
registerPass graph, semPass
compileProject(graph)
if conf.errorCounter == 0:
# xxx deduplicate with D20210419T170230
let mem =
when declared(system.getMaxMem): formatSize(getMaxMem()) & " peakmem"
else: formatSize(getTotalMem()) & " totmem"
@ -1213,7 +1214,7 @@ proc mainCommand(graph: ModuleGraph) =
elif isDefined(conf, "release"): "Release"
else: "Debug"
let sec = formatFloat(epochTime() - conf.lastCmdTime, ffDecimal, 3)
let project = if optListFullPaths in conf.globalOptions: $conf.projectFull else: $conf.projectName
let project = if conf.filenameOption == foAbs: $conf.projectFull else: $conf.projectName
rawMessage(conf, hintSuccessX, [
"loc", loc,
"sec", sec,