Thread overview
Dub platform probes
May 25, 2020
Tim
May 25, 2020
Anonymouse
May 26, 2020
Andre Pany
May 27, 2020
Tim
May 27, 2020
Andre Pany
May 28, 2020
Tim
May 28, 2020
Mathias LANG
May 25, 2020
Hi all

I end up with a directory flooded with platform probes. How can I make sure that old ones are deleted automatically?

Thanks
May 25, 2020
On Monday, 25 May 2020 at 22:58:54 UTC, Tim wrote:
> [...]

Same here, but /tmp.

$ ls /tmp/dub* | wc -l
174


May 26, 2020
On Monday, 25 May 2020 at 22:58:54 UTC, Tim wrote:
> Hi all
>
> I end up with a directory flooded with platform probes. How can I make sure that old ones are deleted automatically?
>
> Thanks

Hi,
What version of dub do you use? I am not 100 % sure but thought platform probes do not longer write files with recent dub version.
Do you use DMD or LDC or GDC?

Kind regards
Andre
May 27, 2020
On Tuesday, 26 May 2020 at 09:17:52 UTC, Andre Pany wrote:
> Hi,
> What version of dub do you use? I am not 100 % sure but thought platform probes do not longer write files with recent dub version.
> Do you use DMD or LDC or GDC?
>
> Kind regards
> Andre

Hi there

I'm using Dub 1.19.0-1build2 with dmd

Thanks
May 27, 2020
On Wednesday, 27 May 2020 at 04:19:46 UTC, Tim wrote:
> On Tuesday, 26 May 2020 at 09:17:52 UTC, Andre Pany wrote:
>> Hi,
>> What version of dub do you use? I am not 100 % sure but thought platform probes do not longer write files with recent dub version.
>> Do you use DMD or LDC or GDC?
>>
>> Kind regards
>> Andre
>
> Hi there
>
> I'm using Dub 1.19.0-1build2 with dmd
>
> Thanks

I read through the source code. The probe file is created here https://github.com/dlang/dub/blob/master/source/dub/compilers/utils.d#L296
The function getTempFile determines a new random temp file name and stores the file path in a global variable. A module destructor loops through this string array list and deletes the temp files https://github.com/dlang/dub/blob/master/source/dub/internal/utils.d#L98

I wonder why in your case the temp files are not deleted.

Kind regards
Andre
May 28, 2020
On Wednesday, 27 May 2020 at 21:17:54 UTC, Andre Pany wrote:
> I read through the source code. The probe file is created here https://github.com/dlang/dub/blob/master/source/dub/compilers/utils.d#L296
> The function getTempFile determines a new random temp file name and stores the file path in a global variable. A module destructor loops through this string array list and deletes the temp files https://github.com/dlang/dub/blob/master/source/dub/internal/utils.d#L98
>
> I wonder why in your case the temp files are not deleted.
>
> Kind regards
> Andre

Me too. I have noticed that sometimes I don't need to and other times I do. Maybe it is to do with program crashes where it isn't cleaned up? I'll keep a closer eye on it

May 28, 2020
On Thursday, 28 May 2020 at 02:28:07 UTC, Tim wrote:
> On Wednesday, 27 May 2020 at 21:17:54 UTC, Andre Pany wrote:
>> I read through the source code. The probe file is created here https://github.com/dlang/dub/blob/master/source/dub/compilers/utils.d#L296
>> The function getTempFile determines a new random temp file name and stores the file path in a global variable. A module destructor loops through this string array list and deletes the temp files https://github.com/dlang/dub/blob/master/source/dub/internal/utils.d#L98
>>
>> I wonder why in your case the temp files are not deleted.
>>
>> Kind regards
>> Andre
>
> Me too. I have noticed that sometimes I don't need to and other times I do. Maybe it is to do with program crashes where it isn't cleaned up? I'll keep a closer eye on it

Is the app you're building a server by any chance ?
There's a recurrent problem with `dub`:
- https://github.com/dlang/dub/issues/536
There's a fix for it, unmerged though as it needs some work/testing: https://github.com/dlang/dub/pull/1696