nim-lang / nimble

Package manager for the Nim programming language.
https://nim-lang.github.io/nimble/index.html
Other
1.25k stars 190 forks source link

Print .nim files as they're compiled when --debug is used? #936

Open aleclarson opened 3 years ago

aleclarson commented 3 years ago

Or maybe a new --printFiles flag?

I'm trying to debug an error that occurs during nimble install with nim devel

Error: internal error: getTypeDescAux(tyEmpty)
No stack traceback available
To create a stacktrace, rerun compilation with './koch temp c <file>', see https://nim-lang.github.io/Nim/intern.html#debugging-the-compiler for details

Having nimble install print which .nim file it tried last (along with the other files before it, ofc) would allow me to do ./koch temp c <file> to generate the stack traceback.

Alternatively, having a way to tell nimble install to use koch temp when compiling would also work, I think.

dom96 commented 3 years ago

nimble --debug and then you will see the command that Nimble runs. Just s/nim/koch temp c/ and you'll have what you want.

Nimble doesn't compile the files individually, it just calls into Nim to do this.