summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-17 01:56:19 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-07-17 01:56:45 +0200
commitc3315bc7637bcaa766acf6b5c58188fce568d9ca (patch)
treeb42354b6548142fbc1b8944b3309d60a320a8ef5
parentec0de31751482e816557fb5d52ef3b02640566d8 (diff)
downloadNim-c3315bc7637bcaa766acf6b5c58188fce568d9ca.tar.gz
added gFuzzyGraphChecking for nimsuggest timeout problems
-rw-r--r--compiler/modules.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/modules.nim b/compiler/modules.nim
index 6849be877..a45de6d72 100644
--- a/compiler/modules.nim
+++ b/compiler/modules.nim
@@ -29,6 +29,7 @@ var
   gMemCacheData*: seq[TModuleInMemory] = @[]
     ## XXX: we should implement recycling of file IDs
     ## if the user keeps renaming modules, the file IDs will keep growing
+  gFuzzyGraphChecking*: bool # nimsuggest uses this. XXX figure out why.
 
 proc getModule*(fileIdx: int32): PSym =
   if fileIdx >= 0 and fileIdx < gCompiledModules.len:
@@ -105,14 +106,13 @@ proc checkDepMem(fileIdx: int32): TNeedRecompile =
     resetModule(fileIdx)
     return Yes
 
-  when false:
+  if gFuzzyGraphChecking:
     if gMemCacheData[fileIdx].needsRecompile != Maybe:
       return gMemCacheData[fileIdx].needsRecompile
   else:
     # cycle detection: We claim that a cycle does no harm.
     if gMemCacheData[fileIdx].needsRecompile == Probing:
       return No
-      #return gMemCacheData[fileIdx].needsRecompile
 
   if optForceFullMake in gGlobalOptions or hashChanged(fileIdx):
     markDirty()