From 39839fda8a428d0d1626d9f2520b79ab68fa472b Mon Sep 17 00:00:00 2001 From: def Date: Tue, 3 Feb 2015 09:04:24 +0100 Subject: [PATCH 1/3] Rename *.nimrod.cfg to *.nim.cfg --- compiler/{nim.nimrod.cfg => nim.nim.cfg} | 0 koch.nimrod.cfg => koch.nim.cfg | 0 lib/{nimrtl.nimrod.cfg => nimrtl.nim.cfg} | 0 lib/pure/{asyncdispatch.nimrod.cfg => asyncdispatch.nim.cfg} | 0 lib/pure/{nimprof.nimrod.cfg => nimprof.nim.cfg} | 0 lib/pure/{smtp.nimrod.cfg => smtp.nim.cfg} | 0 tests/dll/{client.nimrod.cfg => client.nim.cfg} | 0 tests/dll/{server.nimrod.cfg => server.nim.cfg} | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename compiler/{nim.nimrod.cfg => nim.nim.cfg} (100%) rename koch.nimrod.cfg => koch.nim.cfg (100%) rename lib/{nimrtl.nimrod.cfg => nimrtl.nim.cfg} (100%) rename lib/pure/{asyncdispatch.nimrod.cfg => asyncdispatch.nim.cfg} (100%) rename lib/pure/{nimprof.nimrod.cfg => nimprof.nim.cfg} (100%) rename lib/pure/{smtp.nimrod.cfg => smtp.nim.cfg} (100%) rename tests/dll/{client.nimrod.cfg => client.nim.cfg} (100%) rename tests/dll/{server.nimrod.cfg => server.nim.cfg} (100%) diff --git a/compiler/nim.nimrod.cfg b/compiler/nim.nim.cfg similarity index 100% rename from compiler/nim.nimrod.cfg rename to compiler/nim.nim.cfg diff --git a/koch.nimrod.cfg b/koch.nim.cfg similarity index 100% rename from koch.nimrod.cfg rename to koch.nim.cfg diff --git a/lib/nimrtl.nimrod.cfg b/lib/nimrtl.nim.cfg similarity index 100% rename from lib/nimrtl.nimrod.cfg rename to lib/nimrtl.nim.cfg diff --git a/lib/pure/asyncdispatch.nimrod.cfg b/lib/pure/asyncdispatch.nim.cfg similarity index 100% rename from lib/pure/asyncdispatch.nimrod.cfg rename to lib/pure/asyncdispatch.nim.cfg diff --git a/lib/pure/nimprof.nimrod.cfg b/lib/pure/nimprof.nim.cfg similarity index 100% rename from lib/pure/nimprof.nimrod.cfg rename to lib/pure/nimprof.nim.cfg diff --git a/lib/pure/smtp.nimrod.cfg b/lib/pure/smtp.nim.cfg similarity index 100% rename from lib/pure/smtp.nimrod.cfg rename to lib/pure/smtp.nim.cfg diff --git a/tests/dll/client.nimrod.cfg b/tests/dll/client.nim.cfg similarity index 100% rename from tests/dll/client.nimrod.cfg rename to tests/dll/client.nim.cfg diff --git a/tests/dll/server.nimrod.cfg b/tests/dll/server.nim.cfg similarity index 100% rename from tests/dll/server.nimrod.cfg rename to tests/dll/server.nim.cfg From 12ad32e951374c31ff951c8023ef683f454277bc Mon Sep 17 00:00:00 2001 From: def Date: Wed, 4 Feb 2015 13:01:11 +0100 Subject: [PATCH 2/3] Typos --- compiler/msgs.nim | 2 +- compiler/nimconf.nim | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 35a1217692..a80f4a4982 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -460,7 +460,7 @@ type TLineInfo*{.final.} = object # This is designed to be as small as possible, # because it is used - # in syntax nodes. We safe space here by using + # in syntax nodes. We save space here by using # two int16 and an int32. # On 64 bit and on 32 bit systems this is # only 8 bytes. diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim index bcf9b53596..cd1fa784ff 100644 --- a/compiler/nimconf.nim +++ b/compiler/nimconf.nim @@ -14,7 +14,7 @@ import options, idents, wordrecg # ---------------- configuration file parser ----------------------------- -# we use Nim's scanner here to safe space and work +# we use Nim's scanner here to save space and work proc ppGetTok(L: var TLexer, tok: var TToken) = # simple filter @@ -157,7 +157,7 @@ proc checkSymbol(L: TLexer, tok: TToken) = proc parseAssignment(L: var TLexer, tok: var TToken) = if tok.ident.id == getIdent("-").id or tok.ident.id == getIdent("--").id: confTok(L, tok) # skip unnecessary prefix - var info = getLineInfo(L, tok) # safe for later in case of an error + var info = getLineInfo(L, tok) # save for later in case of an error checkSymbol(L, tok) var s = tokToStr(tok) confTok(L, tok) # skip symbol From 2b9d7068cbb38fd9281dde00936eac6d48fe91b1 Mon Sep 17 00:00:00 2001 From: def Date: Wed, 4 Feb 2015 13:01:21 +0100 Subject: [PATCH 3/3] Add support for nimcfg and warning for nimrod.cfg --- compiler/nimconf.nim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim index cd1fa784ff..5304dc2659 100644 --- a/compiler/nimconf.nim +++ b/compiler/nimconf.nim @@ -246,6 +246,11 @@ proc loadConfigs*(cfg: string) = if gProjectName.len != 0: # new project wide config file: - let projectConfig = changeFileExt(gProjectFull, "nim.cfg") - if fileExists(projectConfig): readConfigFile(projectConfig) - else: readConfigFile(changeFileExt(gProjectFull, "nimrod.cfg")) + var projectConfig = changeFileExt(gProjectFull, "nimcfg") + if not fileExists(projectConfig): + projectConfig = changeFileExt(gProjectFull, "nim.cfg") + if not fileExists(projectConfig): + projectConfig = changeFileExt(gProjectFull, "nimrod.cfg") + if fileExists(projectConfig): + rawMessage(warnDeprecated, projectConfig) + readConfigFile(projectConfig)