Closed narimiran closed 4 years ago
For me that -o:cligenn
command works on all Nim after 0.20.0 with both nim c
and nim cpp
. It should be cligen/mslice
, no? Or at least ./mslice
to be clear to a reader it is expected in the same directory as textUt.nim
itself. Does the dot-slash version of the import work for you? (Since I cannot reproduce the failure, I have to ask you to try.)
I guess I probably have a --path:path-to-cg-repo
in my ~/.config/nim/nim.cfg
which may explain the difference in behavior we see, but it should definitely be possible to do a namespaced import however search paths are set up or there's a bona fide Nim bug, I'd say.
Also, that import has been there for almost a week. Has it been breaking your CI that whole time?
Does the dot-slash version of the import work for you?
Yes, import ./mslice
works fine.
Since I cannot reproduce the failure, I have to ask you to try.
Note that on devel
branch there is also no problem with the way it is currently (cligen/mslice
), it is just version-1-2
branch that has that problem.
We should (maybe) also take into an account that packages in version-1-2
are tested via Azure Pipelines, while in devel
they are tested via Github Actions.
Ok. Well, I am ok with the dot-slash version. Just want some way to indicate it is expected to come from a local module. I do other import cligen/
in places, but maybe not in ways that would be tickled by the CI.
The error from the title is shown when our CIs try to run
nim c -o:cligenn -r cligen.nim
with Nim v1.2.x, and it is the same for me locally.The culprit is in this line. If the
cligen/mslice
import is changed tomslice
(import critbits, re, mslice, math # ^
), it works on my machine.