You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to how batch files die if the file gets modified or deleted during execution.
If you have a nimscript file a.nims with:
rmFile("a.nims")
Running this script gives random error about filename. This affected nimble's nocompiler feature (removing compiler from nimble). As noted by @andreaferretti in nim-lang/nimble#635 (comment), since nimble is being called recursively, the nims file copied by parent process gets deleted by child process.
I am fixing this in nimble separately (don't delete if you didn't copy it in the first place) but it seems this might bite others as well. The use case might not be too common but interesting to document at the very least.
Just to clarify again - the way I found the issue is not the typical use case. Fact is that if you run nim e with a bad filename, you get an unrelated error and it isn't clear what happened. You can also recreate the issue by deleting the file at runtime.
(1, 21) Error: undeclared identifier: 'a' suggests that there's a problem in the file contents, not that the file doesn't even exist or got deleted during execution.
Similar to @timotheecour's report, .nim extension is not support for nim e but you don't get a helpful error.
genotrance
changed the title
nim e fails if script file gets deleted during execution
nim e fails with incorrect error if file does not exist or if script file gets deleted during execution
Jul 19, 2019
Similar to how batch files die if the file gets modified or deleted during execution.
If you have a nimscript file
a.nims
with:Running this script gives random error about filename. This affected nimble's nocompiler feature (removing compiler from nimble). As noted by @andreaferretti in nim-lang/nimble#635 (comment), since nimble is being called recursively, the nims file copied by parent process gets deleted by child process.
I am fixing this in nimble separately (don't delete if you didn't copy it in the first place) but it seems this might bite others as well. The use case might not be too common but interesting to document at the very least.
Error (with stack trace) is:
The text was updated successfully, but these errors were encountered: