Running nimble test on a project fails with a compilation error, whereas with 2.2.4 the tests built and ran successfully.
Here is an extract from the output, showing where it fails:
Nim Output Hint: used config file '/home/vinay/.choosenim/toolchains/nim-2.2.6/config/nim.cfg' [Conf]
... Hint: used config file '/home/vinay/.choosenim/toolchains/nim-2.2.6/config/config.nims' [Conf]
... Hint: used config file '/home/vinay/projects/nim-cfg-lib/tests/config.nims' [Conf]
... .................................................................................................................................................
... /home/vinay/projects/nim-cfg-lib/src/config.nim(303, 29) Warning: 'Lock levels' are deprecated, now a noop [Deprecated]
... /home/vinay/projects/nim-cfg-lib/src/config.nim(306, 32) Warning: 'Lock levels' are deprecated, now a noop [Deprecated]
... /home/vinay/projects/nim-cfg-lib/src/config.nim(313, 34) Warning: 'Lock levels' are deprecated, now a noop [Deprecated]
... CC: system.nim
... CC: parseutils.nim
... CC: math.nim
... /home/vinay/.cache/nim/test1_d/@psystem.nim.c: In function ‘eqdestroy___test1_u33636’:
... /home/vinay/.cache/nim/test1_d/@psystem.nim.c:8827:31: error: dereferencing pointer to incomplete type ‘tyObject_LocationcolonObjectType___p5IZhfkAzQ1mJNonoMMCEQ {aka struct tyObject_LocationcolonObjectType___p5IZhfkAzQ1mJNonoMMCEQ}’
... eqdestroy___test1_u114((&(*dest_p0.p->data[colontmp_].loc)));
... ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... CC: algorithm.nim
... CC: unicode.nim
... Error: execution of an external compiler program 'gcc -c -w -fmax-errors=3 -fno-strict-aliasing -pthread -I/home/vinay/.choosenim/toolchains/nim-2.2.6/lib -I/home/vinay/projects/nim-cfg-lib/tests -o /home/vinay/.cache/nim/test1_d/@psystem.nim.c.o /home/vinay/.cache/nim/test1_d/@psystem.nim.c' failed with exit code: 1
tools.nim(37) doCmd
and the config.nims just contains
switch("path", "$projectDir/../src")
The test was run on Linux Mint:
NAME="Linux Mint"
VERSION="19.1 (Tessa)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 19.1"
VERSION_ID="19.1"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=tessa
UBUNTU_CODENAME=bionic and GCC version information is:
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Can anyone suggest why this failure is happening? I haven't included details of the actual project where the tests are, as there's too much code to post and the error appears related to compiling system.nim, so seems unrelated to the specifics of the project.