nim-lang / nimble

Package manager for the Nim programming language.
https://nim-lang.github.io/nimble/index.html
Other
1.25k stars 191 forks source link

doc2 task #189

Closed andreaferretti closed 7 years ago

andreaferretti commented 8 years ago

Nim handles the generation of documentation through the doc and doc2 commands. Usually, this requires some configuration parameters (e.g. docSeeSrcUrl), hence I had used nimscript to run the task, like this

task gendoc, "generate documentation":
  --define: cublas
  --docSeeSrcUrl: https://github.com/unicredit/linear-algebra/blob/master
  setCommand "doc2", "linalg"

When doing the same in nimble, though, I get an error stating that nimble does not know the doc2 task (even though it is native to nim, like c or js).

dom96 commented 8 years ago

It's native to Nim, but not to Nimble. setCommand sets the command for Nimble, not Nim. You need to use exec.

andreaferretti commented 8 years ago

Using exec breaks the task DSL. One has to pass everything as a big string instead of passing options via nimscript. Not that this is a big deal (just two options in my case) but I do not see a good reason not to support it in the same way as c or js

dom96 commented 8 years ago

Sorry. On second thought you are right. The documentation generator also accesses each module's imports so it makes sense.

andreaferretti commented 8 years ago

Any update on this?

dom96 commented 8 years ago

Not really. There are a bunch of high priority issues which I need to fix before I get to this one.