Don't include the nimhcr dev docs in the system module documentation (#10759)

This commit is contained in:
zah 2019-03-08 16:23:36 +02:00 • committed by Andreas Rumpf
commit b9f8528db6
5 changed files with 186 additions and 188 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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