www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Why is object.d in the ldc directory ?

reply Marco Leise <Marco.Leise gmx.de> writes:
object.d in the ldc directory causes a problem when starting
up dcd, which expects to find it at the top level.
An additional import path can be added to dcd's configuration,
but I figured I'd first ask if it could be moved one level up.

-- 
Marco
Apr 15 2016
parent reply David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On 15 Apr 2016, at 23:15, Marco Leise via digitalmars-d-ldc wrote:
 object.d in the ldc directory causes a problem when starting
 up dcd, which expects to find it at the top level.
 An additional import path can be added to dcd's configuration,
 but I figured I'd first ask if it could be moved one level up.
Since a mismatching object.d causes rather ungraceful failures, this was done originally to avoid conflicts with other compilers if users were to unwittingly install them in the same prefix. Of course, since we (unfortunately) have a small set of patches to druntime/Phobos, it would still not be advisable to do so even with .object out of the picture. I would suppose that adding the other path is the better option right now – even if we were to condense the two import directories back into one, you'd have to wait a year or so unless you can be reasonably certain that the change has percolated to user machines. — David
Apr 17 2016
parent reply Marco Leise <Marco.Leise gmx.de> writes:
Am Sun, 17 Apr 2016 15:27:41 +0100
schrieb David Nadlinger via digitalmars-d-ldc
<digitalmars-d-ldc puremagic.com>:

 On 15 Apr 2016, at 23:15, Marco Leise via digitalmars-d-ldc wrote:
 object.d in the ldc directory causes a problem when starting
 up dcd, which expects to find it at the top level.
 An additional import path can be added to dcd's configuration,
 but I figured I'd first ask if it could be moved one level up. =20
=20 Since a mismatching object.d causes rather ungraceful failures, this was=
=20
 done originally to avoid conflicts with other compilers if users were to=
=20
 unwittingly install them in the same prefix. Of course, since we=20
 (unfortunately) have a small set of patches to druntime/Phobos, it would=
=20
 still not be advisable to do so even with .object out of the picture.
=20
 I would suppose that adding the other path is the better option right=20
 now =E2=80=93 even if we were to condense the two import directories back=
into=20
 one, you'd have to wait a year or so unless you can be reasonably=20
 certain that the change has percolated to user machines.
=20
   =E2=80=94=C2=A0David
So it was done under the assumption that these two compilers installed in the same prefix share the same Phobos version. Oh well, ok. :) --=20 Marco
Apr 19 2016
next sibling parent reply Johan Engelen <j j.nl> writes:
On Tuesday, 19 April 2016 at 19:55:01 UTC, Marco Leise wrote:
 So it was done under the assumption that these two compilers 
 installed in the same prefix share the same Phobos version. Oh 
 well, ok. :)
The libraries are named differently: `libphobos2-ldc.a` for example. (but you could be right that the phobos _version_ is the same ;-)
Apr 20 2016
parent Johan Engelen <j j.nl> writes:
On Wednesday, 20 April 2016 at 11:01:15 UTC, Johan Engelen wrote:
 On Tuesday, 19 April 2016 at 19:55:01 UTC, Marco Leise wrote:
 So it was done under the assumption that these two compilers 
 installed in the same prefix share the same Phobos version. Oh 
 well, ok. :)
The libraries are named differently: `libphobos2-ldc.a` for example. (but you could be right that the phobos _version_ is the same ;-)
Hmm, sorry, indeed the source of phobos would then still be shared... doh!
Apr 20 2016
prev sibling parent David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On 19 Apr 2016, at 20:55, Marco Leise via digitalmars-d-ldc wrote:
 So it was done under the assumption that these two compilers
 installed in the same prefix share the same Phobos version.
 Oh well, ok. :)
There is probably no good justification at this point anymore, as the druntime/Phobos headers would usually be slightly different even between e.g. DMD and LDC of the same version. I am pretty sure that the reason for the second import path to be added/object.d(i) to be moved was to avoid frequent conflicts due to user mistakes, but maybe that was just because back then we would crash, or because there was a configuration during the D1 days where this made sense. We could probably just move it back to the top level now… — David
Apr 21 2016