docopt / docopt.nim

Command line arguments parser that will make you smile (port of docopt to Nim)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work under nim 0.20.0

squattingmonk opened this issue · comments

While the package builds, attempting to use it (including in the example files), gives the following error:

/home/squattingmonk/.nimble/pkgs/regex-0.10.0/regex.nim(2838, 45) template/generic instantiation from here
/home/squattingmonk/.choosenim/toolchains/nim-0.20.0/lib/pure/parseutils.nim(452, 54) Error: can raise an unlisted exception: ValueError

Works for me (with 0.2.0) using this in my .nimble file:

requires "https://github.com/docopt/docopt.nim#head"

@squattingmonk you might need to update your installed regex package: nimble install regex@#head (make sure to escape the # if your shell treats it as a comment).

Thanks, @dom96. That was it.

Can anything be done to mitigate that or make it more apparent?

@oprypin good question. Yes, there is. Update your .nimble file to depend on >= 0.11.2 of regex (released just 17 hours ago)

Is there any other possible reasons besides the regex package updates?
I updated regex to 0.11, the simple example odd_even.nim still is not working for me.

My setup has been wrapped in this docker image: docker://ruqian/customised_hts_nim:lastest

The error produced:
nim c --nimCache:./nimCache/ --nimblePath:/rlyu_nimble_pkgs/pkgs/ -r odd_even.nim 1 2 3 /odd_even.nim(14) odd_even /rlyu_nimble_pkgs/pkgs/docopt-0.6.8/docopt.nim(666) docopt /rlyu_nimble_pkgs/pkgs/docopt-0.6.8/docopt.nim(602) docopt_exc Error: unhandled exception: [DocoptExit] Error: execution of an external program failed: '/odd_even 1 2 3'

Thanks
Ruqian