nimsuggest: dependencies are recalculated properly
This commit is contained in:
parent
813828f690
commit
7df8b4bb43
1 changed files with 7 additions and 6 deletions
|
|
@ -105,12 +105,13 @@ proc checkDepMem(fileIdx: int32): TNeedRecompile =
|
||||||
resetModule(fileIdx)
|
resetModule(fileIdx)
|
||||||
return Yes
|
return Yes
|
||||||
|
|
||||||
if gMemCacheData[fileIdx].needsRecompile != Maybe:
|
# cycle detection: We claim that a cycle does no harm.
|
||||||
return gMemCacheData[fileIdx].needsRecompile
|
if gMemCacheData[fileIdx].needsRecompile == Probing:
|
||||||
|
return No
|
||||||
|
#return gMemCacheData[fileIdx].needsRecompile
|
||||||
|
|
||||||
if optForceFullMake in gGlobalOptions or
|
if optForceFullMake in gGlobalOptions or hashChanged(fileIdx):
|
||||||
hashChanged(fileIdx):
|
markDirty()
|
||||||
markDirty
|
|
||||||
|
|
||||||
if gMemCacheData[fileIdx].deps != nil:
|
if gMemCacheData[fileIdx].deps != nil:
|
||||||
gMemCacheData[fileIdx].needsRecompile = Probing
|
gMemCacheData[fileIdx].needsRecompile = Probing
|
||||||
|
|
@ -118,7 +119,7 @@ proc checkDepMem(fileIdx: int32): TNeedRecompile =
|
||||||
let d = checkDepMem(dep)
|
let d = checkDepMem(dep)
|
||||||
if d in {Yes, Recompiled}:
|
if d in {Yes, Recompiled}:
|
||||||
# echo fileIdx.toFilename, " depends on ", dep.toFilename, " ", d
|
# echo fileIdx.toFilename, " depends on ", dep.toFilename, " ", d
|
||||||
markDirty
|
markDirty()
|
||||||
|
|
||||||
gMemCacheData[fileIdx].needsRecompile = No
|
gMemCacheData[fileIdx].needsRecompile = No
|
||||||
return No
|
return No
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue