Closed timotheecour closed 5 years ago
Did you install the package? Or clone and nimble develop then nimble setup?
Looks like nimgen hasn't been run yet.
oops, I hadn't; however:
nimble setup
Executing task setup in /Users/timothee/git_clone/nim/nimgraphql/nimgraphql.nimble
Hint: used config file '/Users/timothee/git_clone/nim/Nim/config/nim.cfg' [Conf]
Hint: used config file '/Users/timothee/.config/nim/nim.cfg' [Conf]
Resetting Git repo
File doesn't exist: GraphQLAst.h
stack trace: (most recent call last)
/Users/timothee/git_clone/nim/nimgraphql/nimgraphql.nimble(21) setupTask
/Users/timothee/git_clone/nim/Nim/lib/system/nimscript.nim(237) exec
/Users/timothee/git_clone/nim/Nim/lib/system/nimscript.nim(237, 7) Error: unhandled exception: FAILED: nimgen nimgraphql.cfg
Do you have python2 in the path? It needs to generate the header files. That's done by libgraphqlparser.
I do
btw: not yet familiar with nimgen but I feel like nimgraphql.cfg
would be much better off as a pure nim file
cfg should IMO only be used for the simplest things; nimgraphql.cfg
is already way past that complexity threshold;
it'd be more DRY, more reusable, modular, debuggable, modifyable etc (lots of duplication inside that file)
The duplication was just a first effort to get this working. The cfg is simpler now. Are you on OSX by any chance?
As for complexity, it started as a simple way to drive nimgen to do things. I added a CLI method recently for an even simpler way. It could have been a library but that's perhaps a higher bar to wrap anything.
Most wrappers are simple, these C++ ones are like this because of all the limitations being discussed in the other thread. It is interesting nonetheless and probably worth considering. However, how you would get a nimble install X
to build and run this EXE is something I'm wondering about.
Are you on OSX by any chance?
yes
However, how you would get a nimble install X to build and run this EXE is something I'm wondering about
not sure I understand; nimble install X
can run arbitrary code including executing a shell command
I added a CLI method recently for an even simpler way
cool, will check it again
side note: btw what do you think of something like https://github.com/AutoFFI/AutoFFI/blob/master/src/clang.cpp ?