My code used to work. msgpack4nim was updated for nim-0.19.4, and now my code fails. But I don't think it's a bug in msgpack4nim, and I don't think I'm doing anything unexpected. I think there might be a fundamental problem with how Nim handles templates across multiple files now.
https://github.com/jangko/msgpack4nim/issues/30
Does anybody have a solution? Or an idea?
This turned out to be an unrelated problem.
However, I did find a problem with relative imports here: https://github.com/c-blake/cligen/issues/88 That one is easy to work around, and might be a mistake by the user anyway.
But I do wonder how relative imports are supposed to work. I don't see any mention of relative imports in the Nim manual.
https://nim-lang.org/docs/nimc.html#compiler-usage-search-path-handling
I needed to check the compiler docs instead of the language docs. Duh! It's obvious now that I see it.