How to unit-test a phobos module?

Paul Backus snarwin at gmail.com
Thu Nov 26 00:48:03 UTC 2020


On Thursday, 26 November 2020 at 00:17:26 UTC, Q. Schroll wrote:
>
> One of the issues is, I don't know what DRuntime really is. As 
> far as I understand on the surface-level, it's functionality 
> one would expect to be implemented by the compiler, but 
> actually implemented in plain D code. A low-level Phobos if you 
> want. So I'm a little confused why there's even a need for it 
> to be "built". Isn't it "just code" like Phobos?

Phobos depends on DRuntime, and both Phobos and DRuntime depend 
on the D compiler. When you download version 2.094.2 of the 
compiler (the latest release), it comes with the corresponding 
versions of Phobos and DRuntime, and is configured to 
automatically include them in its import paths.

If you want to compile the development version of Phobos, you 
will generally need the development versions of DRuntime and DMD 
as well, because of the dependency relationships between them. If 
you try to compile the development version of Phobos using the 
latest released versions of DMD and DRuntime, you are liable to 
run into dependency issues like the one in your original post.

>> *ME* Why would I need those? I haven't needed them back then.
>
> I wrote that not saying "do the work for me, guys" but "please 
> tell me what changed".

I have no idea what changed for *your* setup, because (a) I 
develop on Linux, not Windows, and (b) I've only been involved in 
D development since 2018. Personally, I followed the instructions 
on the "Starting as a Contributor" and "Contributing to Phobos" 
pages, and they worked for me.


More information about the Digitalmars-d-learn mailing list