I get the following error when I try running rdmd
std.file.FileException@std/file.d(1364): /tmp/.rdmd-1000: File exists
Comment #1 by bugzilla — 2013-12-31T14:04:57Z
What is the command line you are using?
Comment #2 by puneet — 2013-12-31T22:10:31Z
(In reply to comment #1)
> What is the command line you are using?
Just plain simple
$ rdmd test.d
gives me this error. The error disappears once I remove the directory /tmp/.rdmd-1000 manually. But reappears when I run rdmd again. I have tried running on various machines (all ubuntu 13.10 systems).
I can also confirm that the error appears with the github version
git://github.com/D-Programming-Language/tools.git
SHA1: 1f39ed7b6e1cbb0695d7e9b48ad559efd4193bcb
rdmd: Use a lock file to synchronize concurrent builds in the same workDir
But does not come with rdmd compiled from one previous version
SHA1: f0606e372bf2a226739fab923c0f92cf65ef2228
Merge pull request #101 from andralex/rdmd
Comment #3 by andrej.mitrovich — 2014-01-05T12:06:19Z
Is there a stack trace?
Comment #4 by andrej.mitrovich — 2014-01-05T12:12:19Z
It's likely triggered by one of the three mkdirRecurse calls in RDMD, which calls mkdir on Posix, which is the origin of std/file.d(1364) in git-head.
Maybe there should be a check first via:
if (!path.exists())
path.mkdirRecurse();
Comment #5 by puneet — 2014-01-05T19:32:11Z
(In reply to comment #4)
> It's likely triggered by one of the three mkdirRecurse calls in RDMD, which
> calls mkdir on Posix, which is the origin of std/file.d(1364) in git-head.
>
> Maybe there should be a check first via:
>
> if (!path.exists())
> path.mkdirRecurse();
Andrej you are right. I tried creating a stack report, but somehow I was not able to manage that even I used a version of rdmd compiled with -g flag.
So I patched the rdmd.d as per your suggestion and it works. I have created a pull request.
https://github.com/D-Programming-Language/tools/pull/104
Comment #6 by andrej.mitrovich — 2014-01-06T05:34:04Z
Comment #7 by dlang-bugzilla — 2014-01-06T05:38:18Z
Sorry, you're right, rdmd pull #99 depended on Phobos #1818. I moved mkdirRecurse (then called ensurePathExists) from rdmd to Phobos at Andrei's suggestion. The rdmd pull was merged, and I didn't say anything because I thought the Phobos one would be merged promptly too.
Comment #8 by andrej.mitrovich — 2014-01-06T07:17:51Z