summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/commands.nim4
-rw-r--r--compiler/lookups.nim2
-rw-r--r--compiler/nimfix/nimfix.nim (renamed from compiler/nimfix.nim)5
-rw-r--r--compiler/nimfix/nimfix.nim.cfg (renamed from compiler/nimfix.nim.cfg)3
-rw-r--r--compiler/nimfix/pretty.nim (renamed from compiler/pretty.nim)0
-rw-r--r--compiler/nimfix/prettybase.nim (renamed from compiler/prettybase.nim)0
-rw-r--r--compiler/sem.nim4
-rw-r--r--compiler/sigmatch.nim2
8 files changed, 12 insertions, 8 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index f8f6a9a33..616e50507 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -234,7 +234,9 @@ proc processPath(path: string, notRelativeToProj = false): string =
             path 
           else:
             options.gProjectPath / path
-  result = unixToNativePath(p % ["nimrod", getPrefixDir(), "lib", libpath,
+  result = unixToNativePath(p % ["nimrod", getPrefixDir(),
+    "nim", getPrefixDir(),
+    "lib", libpath,
     "home", removeTrailingDirSep(os.getHomeDir()),
     "projectname", options.gProjectName,
     "projectpath", options.gProjectPath])
diff --git a/compiler/lookups.nim b/compiler/lookups.nim
index 07ac43f38..fa1837296 100644
--- a/compiler/lookups.nim
+++ b/compiler/lookups.nim
@@ -11,7 +11,7 @@
 
 import 
   intsets, ast, astalgo, idents, semdata, types, msgs, options, rodread, 
-  renderer, wordrecg, idgen, prettybase
+  renderer, wordrecg, idgen, nimfix.prettybase
 
 proc ensureNoMissingOrUnusedSymbols(scope: PScope)
 
diff --git a/compiler/nimfix.nim b/compiler/nimfix/nimfix.nim
index 15174fd48..e561b6d4d 100644
--- a/compiler/nimfix.nim
+++ b/compiler/nimfix/nimfix.nim
@@ -21,7 +21,7 @@ Usage:
 Options:
   --overwriteFiles:on|off          overwrite the original nim files.
                                    DEFAULT is ON!
-  --onlyMainfile                   overwrite only the main file.
+  --wholeProject                   overwrite every processed file.
   --checkExtern:on|off             style check also extern names
   --styleCheck:on|off|auto         performs style checking for identifiers
                                    and suggests an alternative spelling; 
@@ -46,6 +46,7 @@ proc mainCommand =
 proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
   var p = parseopt.initOptParser(cmd)
   var argsCount = 0
+  gOnlyMainfile = true
   while true: 
     parseopt.next(p)
     case p.kind
@@ -68,7 +69,7 @@ proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
         of "on": gStyleCheck = StyleCheck.Warn
         of "auto": gStyleCheck = StyleCheck.Auto
         else: localError(gCmdLineInfo, errOnOrOffExpected)
-      of "onlymainfile": gOnlyMainfile = true
+      of "wholeproject": gOnlyMainfile = false
       else:
         processSwitch(pass, p)
     of cmdArgument:
diff --git a/compiler/nimfix.nim.cfg b/compiler/nimfix/nimfix.nim.cfg
index 61df6742e..31a41e080 100644
--- a/compiler/nimfix.nim.cfg
+++ b/compiler/nimfix/nimfix.nim.cfg
@@ -2,9 +2,10 @@
 # gc:markAndSweep
 
 hint[XDeclaredButNotUsed]:off
-path:"$projectPath/.."
+path:"$projectPath/../.."
 
 path:"$lib/packages/docutils"
+path:"$nim/compiler"
 
 define:useStdoutAsStdmsg
 symbol:nimfix
diff --git a/compiler/pretty.nim b/compiler/nimfix/pretty.nim
index acac574af..acac574af 100644
--- a/compiler/pretty.nim
+++ b/compiler/nimfix/pretty.nim
diff --git a/compiler/prettybase.nim b/compiler/nimfix/prettybase.nim
index 225b78479..225b78479 100644
--- a/compiler/prettybase.nim
+++ b/compiler/nimfix/prettybase.nim
diff --git a/compiler/sem.nim b/compiler/sem.nim
index 7446384d2..63475a566 100644
--- a/compiler/sem.nim
+++ b/compiler/sem.nim
@@ -15,11 +15,11 @@ import
   magicsys, parser, nversion, nimsets, semfold, importer,
   procfind, lookups, rodread, pragmas, passes, semdata, semtypinst, sigmatch,
   intsets, transf, vmdef, vm, idgen, aliases, cgmeth, lambdalifting,
-  evaltempl, patterns, parampatterns, sempass2, pretty, semmacrosanity,
+  evaltempl, patterns, parampatterns, sempass2, nimfix.pretty, semmacrosanity,
   semparallel, lowerings
 
 when defined(nimfix):
-  import prettybase
+  import nimfix.prettybase
 
 # implementation
 
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 59f954ff0..b5e01811e 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -13,7 +13,7 @@
 import 
   intsets, ast, astalgo, semdata, types, msgs, renderer, lookups, semtypinst,
   magicsys, condsyms, idents, lexer, options, parampatterns, strutils, trees,
-  pretty
+  nimfix.pretty
 
 when not defined(noDocgen):
   import docgen