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

nim c -r main.nim doesn't recompile if nim binary changes or gets updated #11758

Closed
timotheecour opened this issue Jul 16, 2019 · 0 comments
Closed

Comments

@timotheecour
Copy link
Member

this is a follow up for #11719 regarding the new "smart run" feature

nim c -r main.nim doesn't recompile if nim binary changes (or if the nim binary gets updated)

Example

nim_temp1 c -r main.nim
nim_temp2 c -r main.nim # should recompile because nim_temp2 !=nim_temp1

# main.nim
static: echo "CT:" & NimVersion
echo NimVersion

Current Output

CT:0.20.99
0.20.99
0.20.99

Expected Output

CT:0.20.99
0.20.99
CT:0.20.99
0.20.99

Possible Solution

  • the generated nimcache/main.json should keep track of the nim binary path
  • if the nim binary path changes OR the nim binary is newer than the generated main.json file, then recompile, just like any other dependency

Additional Information

$ nim -v
Nim Compiler Version 0.20.99 [MacOSX: amd64]
Compiled at 2019-07-16
Copyright (c) 2006-2019 by Andreas Rumpf

git hash: 44d80dd86373b9ba41051428948eae30ed97acd3
active boot switches: -d:release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants