-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix #16206, nim r / nim -r
recompiles if cwd changes
#16349
fix #16206, nim r / nim -r
recompiles if cwd changes
#16349
Conversation
This means that doing
triggers a recompilation. This is too eager IMO. |
I don't know of a reliable way to do that, so many flags can depend on CWD:
Furthermore, this would involve among other things understanding and parsing clang flags and linker flags, eg:
or nim's own flags: I also don't know which other flags (or error messages, depending on provided flags) implicitly depend on cwd, The robust approach I have in mind is described inside PR comment, and can be done later (it has other advantages which is caching more than 1 compilation, using a LRU cache to avoid blowing up disk usage). That said, I'd be totally ok with an opt-in flag though, eg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related: #16531
fix #16271
nim r
/nim -r
recompiles if cwd changesI'm hitting same bug as original reporter of #16271, eg with
nim r testament/testament args...
; this PR fixes that in the simplest possible way, that is robust even if pessimistic (recompile on cwd change). Future PR's can add more logic to be robust and less pessimistic, see comment in PR.future work
-d:nimBetterRunIgnoreCwd
(seepr_fix_nimcache_nimrun_16271_followup_nimBetterRunIgnoreCwd
wip PR)