FAIL: tfoo.nim Test "tests/newconfig/tfoo.nim" in category "newconfig" Failure: reNimcCrash Expected: Gotten: invalid command: 'default', but the command PATH=$PATH:bin ./koch tests c newconfig works:
/home/vega/work/nim/Nim/tests/testament/tester c newconfig PASS: tfoo.nim
Hello, i have several questions:
1) How are tasks executed. There is no information in the docs, i suppose you run them with nim [scriptName].nims [taskName]
2) I get Error: cannot 'importc' variable at compile time when executing this script with nim build.nims build:
task build: mkDir("target/lib") exec "nim c src/main.nim" setCommand "nop"
- nim taskName project.nim (NOT project.nims).
- Not sure, does it work without the mkDir?
@r-ku That is a problem because the configuration system doesn't perform a fixpoint iteration, so by the time -d:release is picked up, the default config already set the other switches and it's too late. This issue has nothing to do with nimscript, the old configuration files have exactly this problem too.
EDIT: My own nimscript files use mkDir. Works for me.
task build: mkDir("target/lib") setCommand "c", "src/main.nim"