From 954a018744aa97218f6e6c4d6491551d527a63fe Mon Sep 17 00:00:00 2001 From: Andy Davidoff Date: Wed, 17 Jun 2020 13:21:45 -0400 Subject: [PATCH] 0.8.7: closes #132 --- nimph.nimble | 2 +- src/nimph/config.nim | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/nimph.nimble b/nimph.nimble index 7e324f6..c6ad142 100644 --- a/nimph.nimble +++ b/nimph.nimble @@ -1,4 +1,4 @@ -version = "0.8.6" +version = "0.8.7" author = "disruptek" description = "nim package handler from the future" license = "MIT" diff --git a/src/nimph/config.nim b/src/nimph/config.nim index 31d5cf1..9f8142b 100644 --- a/src/nimph/config.nim +++ b/src/nimph/config.nim @@ -41,13 +41,20 @@ type path: string js: JsonNode +template excludeAllNotes(config: ConfigRef; n: typed) = + config.notes.excl n + when compiles(config.mainPackageNotes): + config.mainPackageNotes.excl n + when compiles(config.foreignPackageNotes): + config.foreignPackageNotes.excl n + template setDefaultsForConfig(result: ConfigRef) = # maybe we should turn off configuration hints for these reads when defined(debugPath): result.notes.incl hintPath elif not defined(debug): - result.notes.excl hintConf - result.notes.excl hintLineTooLong + excludeAllNotes(result, hintConf) + excludeAllNotes(result, hintLineTooLong) proc parseConfigFile*(path: string): Option[ConfigRef] = ## use the compiler to parse a nim.cfg without changing to its directory