From 7815ed69d4a3fc7b96c397c7820cef290f5b0a4d Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Fri, 20 Nov 2020 01:51:14 -0800 Subject: [PATCH] rename loadConfigsAndRunMainCommand => loadConfigsAndProcessCmdLine, reflect reality (#16057) --- compiler/cmdlinehelper.nim | 2 +- compiler/nim.nim | 2 +- drnim/drnim.nim | 2 +- nimsuggest/nimsuggest.nim | 4 ++-- tools/nimfind.nim | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/cmdlinehelper.nim b/compiler/cmdlinehelper.nim index d5a26717da..ffbb0d40b6 100644 --- a/compiler/cmdlinehelper.nim +++ b/compiler/cmdlinehelper.nim @@ -57,7 +57,7 @@ proc processCmdLineAndProjectPath*(self: NimProg, conf: ConfigRef) = else: conf.projectPath = AbsoluteDir canonicalizePath(conf, AbsoluteFile getCurrentDir()) -proc loadConfigsAndRunMainCommand*(self: NimProg, cache: IdentCache; conf: ConfigRef; +proc loadConfigsAndProcessCmdLine*(self: NimProg, cache: IdentCache; conf: ConfigRef; graph: ModuleGraph): bool = if self.suggestMode: conf.command = "nimsuggest" diff --git a/compiler/nim.nim b/compiler/nim.nim index 9ff0eedbce..e3725f8033 100644 --- a/compiler/nim.nim +++ b/compiler/nim.nim @@ -79,7 +79,7 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) = self.processCmdLineAndProjectPath(conf) var graph = newModuleGraph(cache, conf) - if not self.loadConfigsAndRunMainCommand(cache, conf, graph): + if not self.loadConfigsAndProcessCmdLine(cache, conf, graph): return mainCommand(graph) if conf.hasHint(hintGCStats): echo(GC_getStatistics()) diff --git a/drnim/drnim.nim b/drnim/drnim.nim index b4761a3981..d68175c833 100644 --- a/drnim/drnim.nim +++ b/drnim/drnim.nim @@ -1269,7 +1269,7 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) = self.processCmdLineAndProjectPath(conf) var graph = newModuleGraph(cache, conf) - if not self.loadConfigsAndRunMainCommand(cache, conf, graph): return + if not self.loadConfigsAndProcessCmdLine(cache, conf, graph): return mainCommand(graph) if conf.hasHint(hintGCStats): echo(GC_getStatistics()) diff --git a/nimsuggest/nimsuggest.nim b/nimsuggest/nimsuggest.nim index afc692241d..d438e663c8 100644 --- a/nimsuggest/nimsuggest.nim +++ b/nimsuggest/nimsuggest.nim @@ -644,7 +644,7 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) = myLog("START " & conf.projectFull.string) var graph = newModuleGraph(cache, conf) - if self.loadConfigsAndRunMainCommand(cache, conf, graph): + if self.loadConfigsAndProcessCmdLine(cache, conf, graph): mainCommand(graph) when isMainModule: @@ -723,7 +723,7 @@ else: myLog("START " & conf.projectFull.string) var graph = newModuleGraph(cache, conf) - if self.loadConfigsAndRunMainCommand(cache, conf, graph): + if self.loadConfigsAndProcessCmdLine(cache, conf, graph): mockCommand(graph) if gLogging: for it in conf.searchPaths: diff --git a/tools/nimfind.nim b/tools/nimfind.nim index f13e86aaa8..b120ccd1f3 100644 --- a/tools/nimfind.nim +++ b/tools/nimfind.nim @@ -228,7 +228,7 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) = conf.prefixDir = AbsoluteDir"" var graph = newModuleGraph(cache, conf) - if self.loadConfigsAndRunMainCommand(cache, conf, graph): + if self.loadConfigsAndProcessCmdLine(cache, conf, graph): mainCommand(graph) handleCmdLine(newIdentCache(), newConfigRef())