This issue is now fixed on devel, but there's another regression with `nim doc`
\+ `runnableExamples`:
[https://github.com/nim-lang/Nim/issues/14485](https://github.com/nim-lang/Nim/issues/14485)
.
I have reported this in issue
[https://github.com/nim-lang/Nim/issues/14473](https://github.com/nim-lang/Nim/issues/14473)
. Thanks for providing that minimal example.
I have seen a similar issue on nim devel too. I am trying to create a
reproducible example for that.
I also see runnableExamples trying to get executed from sequtils.. My Nim
module does import sequtils, but there are no runnableExamples in it.
Also, I think this issue happens when I have
This happens on nim devel (the version should be 1.3.5). I see that you are
using nim stable 1.2.0.
hmm... I did not occured error.
My environment is here.
$ nim --version
Nim Compiler Version 1.2.0 [Linux: amd64]
Compiled at 2020-04-03
Copyright (c) 2006-2020 by Andreas Rumpf
active boot switches: -d:release
Run
⟩ cat /etc/os-release
Here a mini example which displays this error on nim-devel :
#cxtimeb.nim
import sequtils
template doit():untyped =
## doit
## return output only
toSeq([1,2,3,4,5])
echo doit()
Run
Output ok :
There are no runnableExamples in my module.
The module imports sequtils
The only way I found to circumvent this error in docgen is to add following line
in my module :
export sequtils
Run
I think this should not be required.
I want to watch code of cxtimeb.nim.
After most recent improvements to doc generation I see this error running nim
doc :
/home/lxuser/.cache/nim/cxtimeb_d/runnableExamples/cxtimeb_examples1.nim(15,
12) Error: undeclared identifier: 'toSeq'
[runnableExamples] failed: generated file:
Is there `import sequtils` in runnableExamples?
runnableExamples:
import sequtils
echo toSeq(1..10)
Run
10 matches
Mail list logo