Issue 24290 - The dmd's command line option "-run" creates files in the current directory and this is problematic
Summary: The dmd's command line option "-run" creates files in the current directory a...
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-20 23:22 UTC by Siarhei Siamashka
Modified: 2023-12-22 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Siarhei Siamashka 2023-12-20 23:22:58 UTC
The current directory may be read-only. Also the temporary files created by multiple processes running simultaneously may clash: https://github.com/dlang/dmd/commit/f3a0366f4f3e4af2f793fa6444b203b6a0adce0a

As a solution, the relevant code responsible for creating temporary files can be probably borrowed from `rdmd`, `dub` or `rund`.
Comment 1 Siarhei Siamashka 2023-12-22 03:56:08 UTC
ldc2/ldmd2 also support '-run' option and don't attempt to write object files to the current directory.