Temporary files for `-run`

Johan Engelen via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Sat Apr 30 09:59:30 PDT 2016


On Saturday, 30 April 2016 at 16:42:01 UTC, Joakim wrote:
> On Saturday, 30 April 2016 at 09:09:07 UTC, Johan Engelen wrote:
>> I think at the moment "ldc2 -run program.d" cannot be run 
>> multiple times in parallel (I hit this issue while writing 
>> some lit-based tests). LDC will generate the same temporary 
>> files for each parallel run and will delete them, resulting in 
>> strange problems when different processes are 
>> deleting/accessing the files in an unfortunate sequence.
>>
>> My question to you:
>> does it make sense to work on a PR to generate "random" 
>> obj+exe filenames for "-run" ?
>>
>> cheers,
>>   Johan
>
> Yes, that's the way it should be, makes no sense not to 
> randomize that way for single runs.

Already working on the PR!

But... linker errors will show the temporary filenames. I was 
thinking about creating a random temporary folder but then the 
problem is that I have to add logic to delete that folder after 
execution... Is it OK if linker errors will show funny filenames? 
(aren't linker errors supposed to be incomprehensible? ;-))



More information about the digitalmars-d-ldc mailing list