make fullpaths the default in error messages and stack traces for mor… (#11385)

* make fullpaths the default in error messages and stack traces for more convenient development
* split up -d:release into -d:release and -d:danger flags
* workaround a Nim config parser bug
* fixes an old nim config parser bug
* make megatest green again
* make nimpretty tests work again
* make nimsuggest green
This commit is contained in:
Andreas Rumpf 2019-06-05 08:02:54 +02:00 • committed by GitHub
commit 7215341190
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 41 additions and 27 deletions

View file

@ -276,7 +276,8 @@ const
optBoundsCheck, optOverflowCheck, optAssert, optWarns,
optHints, optStackTrace, optLineTrace,
optTrMacros, optNilCheck, optMoveCheck}
DefaultGlobalOptions* = {optThreadAnalysis}
DefaultGlobalOptions* = {optThreadAnalysis,
optExcessiveStackTrace, optListFullPaths}
proc getSrcTimestamp(): DateTime =
try:
@ -312,7 +313,7 @@ proc newConfigRef*(): ConfigRef =
macrosToExpand: newStringTable(modeStyleInsensitive),
m: initMsgConfig(),
evalExpr: "",
cppDefines: initSet[string](),
cppDefines: initHashSet[string](),
headerFile: "", features: {}, foreignPackageNotes: {hintProcessing, warnUnknownMagic,
hintQuitCalled, hintExecuting},
notes: NotesVerbosity[1], mainPackageNotes: NotesVerbosity[1],
@ -540,7 +541,7 @@ proc getNimcacheDir*(conf: ConfigRef): AbsoluteDir =
conf.projectPath / genSubDir
else:
AbsoluteDir(getOsCacheDir() / splitFile(conf.projectName).name &
(if isDefined(conf, "release"): "_r" else: "_d"))
(if isDefined(conf, "release") or isDefined(conf, "danger"): "_r" else: "_d"))
proc pathSubs*(conf: ConfigRef; p, config: string): string =
let home = removeTrailingDirSep(os.getHomeDir())