I have no clue debugging this exception:
=>> nim c -r --threads:on tests/test_expr.nim
Hint: used config file '/Users/chen/.choosenim/toolchains/nim-1.4.0/config/nim.cfg' [Conf]
Hint: used config file '/Users/chen/.choosenim/toolchains/nim-1.4.0/config/config.nims' [Conf]
Hint: used config file '/Users/chen/repo/cirru/calcit-runner/tests/config.nims' [Conf]
fatal.nim(49) sysFatal
Error: unhandled exception: index 1 not in 0 .. 0 [IndexDefect]
Only changes I made is adding fileExists, and it throws:
import os
# ...
if not fileExists(snapshotFile):
raise newException(ValueError, "snapshot is not found: " & snapshotFile)
# ...
Happens on macos and on a linux CI environment:
Adding import alone also triggers the exception:
import os
at first I thought it was https://github.com/c-blake/cligen/issues/101#issuecomment-718517198 but turned out not..
tried both 1.4 and 1.2.8 with choosenim, can't fix it.
=>> nimble -v
nimble v0.12.0 compiled at 2020-10-29 04:34:41
git hash: couldn't determine git hash
=>> nim -v
Nim Compiler Version 1.4.0 [MacOSX: amd64]
Compiled at 2020-10-29
Copyright (c) 2006-2020 by Andreas Rumpf
active boot switches: -d:release
I changed
case importOp.keywordVal[]:
to
let tmp = importOp.keywordVal[]
case tmp:
and I think I have bypassed the problem for now.