nimble c -r tests/xxx.nim always generate binary files. I used it to run tests very frequently thus generated several binaries in different names. Can be annoying sometimes.
Do you have any general configs of .gitignore for handling this?
I usually use something like this:
*
!/**/
!*.*
*.exe
# anything else you want to ignore
The top section will ignore everything, then add back directories and anything with an extension. Kind of a hack, but it works.
Error: 'run' command not available; rebuild with -d:tinyc
looks like I have to somehow reinstall nim before making it work...
I often use a makefile rule to generate "foo.exe" for each "foo.nim"
%.exe: %.nim
nim c -o:$@ $<
To me the real problem is that "nim c" alters source directories by default. As a general rule, it's helpful if a build system builds into the current-working-directory, so you can simply delete the entire directory later.
mkdir build
cd build
nim c -r ../test/foo.nim
Maybe it doesn't work that way because it would require unique names? Not sure.
As mentioned here, nim r foo.nim uses the cache-dir and avoids recompilation on subsequent calls, which helps. But I sometimes have to define new cache-directories. I work in an enterprise environment, not on my own private laptop, so a shared cache-directory is problematic. That's not a complaint; just something to beware.