How to correctly deal with dmd.conf with multiple dmd installations - [ref osx, brew, digger]

Nick Sabalausky (Abscissa) SeeWebsiteToContactMe at semitwist.com
Tue Sep 25 19:38:22 UTC 2018


On 09/25/2018 06:34 AM, aliak wrote:
> Alo,
> 
> I'm wondering what’s the deal with dmd.conf and what’s the correct way 
> to handle it with dmd installations.
> 

Basically, you want an appropriate, matching `dmd.conf` together with 
(ie, "in the same directory as") each `dmd` executable. No other 
`dmd.conf` should ever exist in any place where it could potentially be 
picked up by a D compiler.[1]

Anything other than that just breeds problems and totally screws up 
normally-perfectly-safe things like upgrading the compiler or having 
multiple compilers installed. Using that rule, I've NEVER had any 
problems from having many different compilers installed.

I'm not familiar with how digger or brew work, so I can't really comment 
on whether they do things safely or not.

[1] There USED to arguably be a (sorta-)good use for having a common 
`dmd.conf` in a non-compiler-specific location: That was in the D1 days 
when there was no DUB, and the built-in `dmd.conf` was trivial and 
rarely changed. In those days, `dmd.conf` could be used as a really 
hacky substitute for a package manager. But there were still 
downsides/dangers to that then, and even more now, so it's really not a 
recommended approach anymore.


More information about the Digitalmars-d mailing list