OK, here's a weird bug. Once I enable both `--threads:on` and `--gc:orc`, all
of my unit tests (which uses the `unittest` module) fail to compile, with
gnarly looking C errors:
/Users/snej/.cache/nim/testCodec_d/@mtestCodec.nim.c:1144:112: error:
incomplete definition of type 'struct
tySequence__shvncLWJZ4vpydQXcCi7CA_Content'
...eq___q9b1rGCpRgO9aMrUqDNKr8xg(&formatterX60gensym15390402_,
NimTV_->formatters__55U7g4zhjHV9bCI6emTgDiA.p->data[i_3]);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/snej/.cache/nim/testCodec_d/@mtestCodec.nim.c:81:16: note: forward
declaration of 'struct tySequence__shvncLWJZ4vpydQXcCi7CA_Content'
typedef struct tySequence__shvncLWJZ4vpydQXcCi7CA_Content
tySequence__shvncLWJZ4vpydQXcCi7CA_Content;
Run
This happens regardless of whether the test file in question uses any
threading/async code. If I turn off either threads or ORC, all is well, except
that the new code I'm writing definitely requires both of them.
I took a look at the generated C file and it's definitely trying to use a
forward-referenced but undeclared type. Beyond that I have no idea; the code's
pretty dang well obfuscated!
(Nim 1.2.2 on macOS 10.15.5. I'm using the Xcode 12 beta, but I don't believe
the command-line tools are affected by that; `clang --version` still reports
`Apple clang version 11.0.3 (clang-1103.0.32.62)`.)