new discovery: import only if available

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Jun 19 13:50:42 PDT 2013


On 6/19/13 3:42 PM, Adam D. Ruppe wrote:
> On Wednesday, 19 June 2013 at 19:20:15 UTC, Sean Kelly wrote:
>> rdmd?
>
> That would pull it in here. What I mean is if:
>
> module a: "weakly" imports module c
> module b: imports module c
>
>
> Module c is available, but:
>
> dmd a.d c.d
>
> explicitly uses module c, so it is pulled.
>
> dmd a.d
>
> only uses module a, because module c isn't used elsewhere and isn't
> explicitly pulled in.
>
>
> dmd a.d b.d
>
> does use module c, because it is required anyway by module b.

Yah, you'd need something like rdmd **/*.d.

Andrei


More information about the Digitalmars-d mailing list