summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/rod.nim4
-rw-r--r--compiler/rodimpl.nim2
2 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rod.nim b/compiler/rod.nim
index f9208f5dc..f6fc24ec0 100644
--- a/compiler/rod.nim
+++ b/compiler/rod.nim
@@ -9,14 +9,14 @@
 
 ## This module implements the canonalization for the various caching mechanisms.
 
-import ast, idgen, lineinfos, msgs, incremental, modulegraphs
+import ast, idgen, lineinfos, msgs, incremental, modulegraphs, pathutils
 
 when not nimIncremental:
   template setupModuleCache*(g: ModuleGraph) = discard
   template storeNode*(g: ModuleGraph; module: PSym; n: PNode) = discard
   template loadNode*(g: ModuleGraph; module: PSym): PNode = newNode(nkStmtList)
 
-  template getModuleId*(g: ModuleGraph; fileIdx: FileIndex; fullpath: string): int = getID()
+  template getModuleId*(g: ModuleGraph; fileIdx: FileIndex; fullpath: AbsoluteFile): int = getID()
 
   template addModuleDep*(g: ModuleGraph; module, fileIdx: FileIndex; isIncludeFile: bool) = discard
 
diff --git a/compiler/rodimpl.nim b/compiler/rodimpl.nim
index 6d2a36606..1a42ca137 100644
--- a/compiler/rodimpl.nim
+++ b/compiler/rodimpl.nim
@@ -53,6 +53,7 @@ proc needsRecompile(g: ModuleGraph; fileIdx: FileIndex; fullpath: AbsoluteFile;
   return false
 
 proc getModuleId*(g: ModuleGraph; fileIdx: FileIndex; fullpath: AbsoluteFile): int =
+  ## Analyse the known dependency graph.
   if g.config.symbolFiles in {disabledSf, writeOnlySf} or
      g.incr.configChanged:
     return getID()
@@ -878,6 +879,7 @@ proc setupModuleCache*(g: ModuleGraph) =
     let oldConfig = db.getValue(sql"select config from config")
     g.incr.configChanged = oldConfig != encodeConfig(g)
   db.exec(sql"pragma journal_mode=off")
+  # This MUST be turned off, otherwise it's way too slow even for testing purposes:
   db.exec(sql"pragma SYNCHRONOUS=off")
   db.exec(sql"pragma LOCKING_MODE=exclusive")
   let lastId = db.getValue(sql"select max(idgen) from controlblock")