Closed ghost closed 6 years ago
It is caused because of a bug in currentSourcePath()
. If two modules ormin.nim
:
template t*: untyped =
echo currentSourcePath()
and app.nim:
import ormin
t()
it outputs the first's module path. It works if we call instantiationInfo(-1, true).filename
directly.
note that even when reverting the last commit and doing:
import ormin
importModel(sqlite, currentSourcePath(), "notes_model")
still gives wrong result:
fatal: cannot open /home/username/nim/src/notesapp.nim/notes_model.sql
Sorry for this rather late reply, but I'm actively working on a good real world Ormin+Karax example that documents its usage (and limitations).
Sure no worries. You have a lot of staff to maintain. Besides I already had a workaround.
I get this error in my code:
notesapp.nim(3, 31) Error: cannot open 'notes_model'
But before that there is another warning:fatal: cannot open $USER/.nimble/pkgs/ormin-#head/ormin.nim/notes_model.sql