IC: first steps towards 'nim check --def --ic:on' (#17714)
* IC: first steps towards 'nim check --def --ic:on' * IC navigator: deduplicate output lines * IC navigator: progress * IC navigator: use a different nimcache entry * IC navigator: special logic for templates/macros * IC navigator: proper error messages * IC navigator: prepare for testing code; document only what currently works somewhat
This commit is contained in:
parent
3b47a689cf
commit
67e28c07f9
11 changed files with 211 additions and 12 deletions
|
|
@ -685,6 +685,11 @@ proc getOsCacheDir(): string =
|
|||
result = getHomeDir() / genSubDir.string
|
||||
|
||||
proc getNimcacheDir*(conf: ConfigRef): AbsoluteDir =
|
||||
proc nimcacheSuffix(conf: ConfigRef): string =
|
||||
if conf.cmd == cmdCheck: "_check"
|
||||
elif isDefined(conf, "release") or isDefined(conf, "danger"): "_r"
|
||||
else: "_d"
|
||||
|
||||
# XXX projectName should always be without a file extension!
|
||||
result = if not conf.nimcacheDir.isEmpty:
|
||||
conf.nimcacheDir
|
||||
|
|
@ -692,7 +697,7 @@ proc getNimcacheDir*(conf: ConfigRef): AbsoluteDir =
|
|||
conf.projectPath / genSubDir
|
||||
else:
|
||||
AbsoluteDir(getOsCacheDir() / splitFile(conf.projectName).name &
|
||||
(if isDefined(conf, "release") or isDefined(conf, "danger"): "_r" else: "_d"))
|
||||
nimcacheSuffix(conf))
|
||||
|
||||
proc pathSubs*(conf: ConfigRef; p, config: string): string =
|
||||
let home = removeTrailingDirSep(os.getHomeDir())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue