www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Dub platform probes

reply Tim <t.oliver windowslive.com> writes:
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
next sibling parent Anonymouse <zorael gmail.com> writes:
On Monday, 25 May 2020 at 22:58:54 UTC, Tim wrote:
 [...]
Same here, but /tmp. $ ls /tmp/dub* | wc -l 174
May 25 2020
prev sibling parent reply Andre Pany <andre s-e-a-p.de> writes:
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 26 2020
parent reply Tim <t.oliver windowslive.com> writes:
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 26 2020
parent reply Andre Pany <andre s-e-a-p.de> writes:
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 27 2020
parent reply Tim <t.oliver windowslive.com> writes:
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 27 2020
parent Mathias LANG <geod24 gmail.com> writes:
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
May 27 2020