summary refs log tree commit diff stats
path: root/compiler/incremental.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/incremental.nim')
-rw-r--r--compiler/incremental.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/incremental.nim b/compiler/incremental.nim
index 2008d35de..47637b3c1 100644
--- a/compiler/incremental.nim
+++ b/compiler/incremental.nim
@@ -12,7 +12,7 @@
 
 const nimIncremental* = defined(nimIncremental)
 
-import options, lineinfos
+import options, lineinfos, pathutils
 
 when nimIncremental:
   import ast, msgs, intsets, btrees, db_sqlite, std / sha1
@@ -45,10 +45,10 @@ when nimIncremental:
     incr.r.types = initBTree[int, PType]()
 
 
-  proc hashFileCached*(conf: ConfigRef; fileIdx: FileIndex; fullpath: string): string =
+  proc hashFileCached*(conf: ConfigRef; fileIdx: FileIndex; fullpath: AbsoluteFile): string =
     result = msgs.getHash(conf, fileIdx)
     if result.len == 0:
-      result = $secureHashFile(fullpath)
+      result = $secureHashFile(string fullpath)
       msgs.setHash(conf, fileIdx, result)
 
   proc toDbFileId*(incr: var IncrementalCtx; conf: ConfigRef; fileIdx: FileIndex): int =
@@ -57,7 +57,7 @@ when nimIncremental:
     let row = incr.db.getRow(sql"select id, fullhash from filenames where fullpath = ?",
       fullpath)
     let id = row[0]
-    let fullhash = hashFileCached(conf, fileIdx, fullpath)
+    let fullhash = hashFileCached(conf, fileIdx, AbsoluteFile fullpath)
     if id.len == 0:
       result = int incr.db.insertID(sql"insert into filenames(fullpath, fullhash) values (?, ?)",
         fullpath, fullhash)
@@ -70,7 +70,7 @@ when nimIncremental:
     if dbId == -1: return FileIndex(-1)
     let fullpath = incr.db.getValue(sql"select fullpath from filenames where id = ?", dbId)
     doAssert fullpath.len > 0, "cannot find file name for DB ID " & $dbId
-    result = fileInfoIdx(conf, fullpath)
+    result = fileInfoIdx(conf, AbsoluteFile fullpath)
 
 
   proc addModuleDep*(incr: var IncrementalCtx; conf: ConfigRef;