summary refs log tree commit diff stats
path: root/compiler/modulepaths.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-07 01:53:09 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-09-07 01:53:09 +0200
commitad9db5cb1aab17d12bc0ed20a1ed0548e351b3db (patch)
treebe7af65d131263d1fd619a4e656a1205a871739b /compiler/modulepaths.nim
parent92863c0e75d32bffb0d7af15310e04cca7da9d3a (diff)
downloadNim-ad9db5cb1aab17d12bc0ed20a1ed0548e351b3db.tar.gz
compiler refactoring; use typesafe path handing; docgen: render symbols between modules
Diffstat (limited to 'compiler/modulepaths.nim')
-rw-r--r--compiler/modulepaths.nim7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/modulepaths.nim b/compiler/modulepaths.nim
index 118002fcf..f0718c4eb 100644
--- a/compiler/modulepaths.nim
+++ b/compiler/modulepaths.nim
@@ -7,9 +7,8 @@
 #    distribution, for details about the copyright.
 #
 
-import ast, renderer, strutils, msgs, options, idents, os, lineinfos
-
-import nimblecmd
+import ast, renderer, strutils, msgs, options, idents, os, lineinfos,
+  pathutils, nimblecmd
 
 when false:
   const
@@ -160,7 +159,7 @@ proc checkModuleName*(conf: ConfigRef; n: PNode; doLocalError=true): FileIndex =
   # This returns the full canonical path for a given module import
   let modulename = getModuleName(conf, n)
   let fullPath = findModule(conf, modulename, toFullPath(conf, n.info))
-  if fullPath.len == 0:
+  if fullPath.isEmpty:
     if doLocalError:
       let m = if modulename.len > 0: modulename else: $n
       localError(conf, n.info, "cannot open file: " & m)