Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "--" template from module nimscript mis-translates "out" key #6011

ghost opened this issue Jun 22, 2017 · 2 comments


None yet
3 participants
Copy link

commented Jun 22, 2017

In this task from a .nimble file

task testBuild, "build the tests":
  --path: ".."
  --verbosity: 2
  --out: "tests/apitest"
  setCommand "cpp", "tests/apitest"

the --out template call is translated to a --var option in the executed command string. When switch "out", "tests/apitest" is used instead, everything works fine.


This comment has been minimized.

Copy link

commented Jul 6, 2017

This seems to be the case since out is a reserved keyword.

template `--`*(key, val: untyped) =
  ## A shortcut for ``switch(astToStr(key), astToStr(val))``.
switch(astToStr(key), strip astToStr(val))

astToStr(path) returns "path", while astToStr(out) returns var


This comment has been minimized.

Copy link

commented Jul 6, 2017

Yet it would be a very simple fix to consider out specially here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.