diff options
author | zah <zahary@gmail.com> | 2019-03-08 16:23:36 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-03-08 15:23:36 +0100 |
commit | b9f8528db675927aacc6443ae3a363711bb41945 (patch) | |
tree | 49d27a29d8fc67daa51f34db9b3647c29c1255ba /compiler | |
parent | bba3a20e7ca50456fa1fc96ec4fa7e917113a840 (diff) | |
download | Nim-b9f8528db675927aacc6443ae3a363711bb41945.tar.gz |
Don't include the nimhcr dev docs in the system module documentation (#10759)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/docgen.nim | 5 | ||||
-rw-r--r-- | compiler/main.nim | 4 | ||||
-rw-r--r-- | compiler/options.nim | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim index 5c3e1af34..8fdf0e4b8 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -992,10 +992,13 @@ proc writeOutputJson*(d: PDoc, useWarning = false) = warnUser, "unable to open file \"" & d.destFile.string & "\" for writing") -proc commandDoc*(cache: IdentCache, conf: ConfigRef) = +proc handleDocOutputOptions*(conf: ConfigRef) = if optWholeProject in conf.globalOptions: # Backward compatibility with previous versions conf.outDir = AbsoluteDir(conf.outDir / conf.outFile) + +proc commandDoc*(cache: IdentCache, conf: ConfigRef) = + handleDocOutputOptions conf var ast = parseFile(conf.projectMainIdx, cache, conf) if ast == nil: return var d = newDocumentor(conf.projectFull, cache, conf) diff --git a/compiler/main.nim b/compiler/main.nim index 154252bf3..84a0fb97d 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -63,9 +63,7 @@ proc commandCheck(graph: ModuleGraph) = when not defined(leanCompiler): proc commandDoc2(graph: ModuleGraph; json: bool) = - if optWholeProject in graph.config.globalOptions: - # Backward compatibility with previous versions - graph.config.outDir = AbsoluteDir(graph.config.outDir / graph.config.outFile) + handleDocOutputOptions graph.config graph.config.errorMax = high(int) # do not stop after first error semanticPasses(graph) if json: registerPass(graph, docgen2JsonPass) diff --git a/compiler/options.nim b/compiler/options.nim index 49ec6e87c..d031da089 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -454,8 +454,7 @@ proc setConfigVar*(conf: ConfigRef; key, val: string) = conf.configVars[key] = val proc getOutFile*(conf: ConfigRef; filename: RelativeFile, ext: string): AbsoluteFile = - result = (if conf.outFile.isEmpty: conf.projectPath else: conf.outDir) / - changeFileExt(filename, ext) + conf.outDir / changeFileExt(filename, ext) proc absOutFile*(conf: ConfigRef): AbsoluteFile = conf.outDir / conf.outFile |