make tests green again
This commit is contained in:
parent
249fd5e56b
commit
7be1c55cf1
2 changed files with 3 additions and 3 deletions
|
|
@ -169,7 +169,7 @@ proc myImportModule(c: PContext, n: PNode): PSym =
|
|||
if recursion >= 0:
|
||||
var err = ""
|
||||
for i in countup(recursion, L-1):
|
||||
if i > 0: err.add "\n"
|
||||
if i > recursion: err.add "\n"
|
||||
err.add toFullPath(c.graph.importStack[i]) & " imports " &
|
||||
toFullPath(c.graph.importStack[i+1])
|
||||
localError(n.info, "recursive module dependency detected:\n" & err)
|
||||
|
|
|
|||
|
|
@ -232,10 +232,10 @@ proc canonicalizePath*(path: string): string =
|
|||
|
||||
proc shortenDir*(dir: string): string =
|
||||
## returns the interesting part of a dir
|
||||
var prefix = getPrefixDir() & DirSep
|
||||
var prefix = gProjectPath & DirSep
|
||||
if startsWith(dir, prefix):
|
||||
return substr(dir, len(prefix))
|
||||
prefix = gProjectPath & DirSep
|
||||
prefix = getPrefixDir() & DirSep
|
||||
if startsWith(dir, prefix):
|
||||
return substr(dir, len(prefix))
|
||||
result = dir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue