DIP11: Automatic downloading of libraries

Nick Sabalausky a at a.a
Tue Jun 14 19:29:34 PDT 2011


"Adam D. Ruppe" <destructionator at gmail.com> wrote in message 
news:it93ah$ekb$1 at digitalmars.com...
>> After the initial "gather everything and
>> build" build, all it would ever have to do is exactly what RDMD
>> already does right now: Run DMD once to find the deps, check them
>> to see if anything needs rebuilt, and if so, run DMD the second
>> time to build.
>
> Does rdmd handle cases where the dependencies have dependencies?
>
> Suppose app.d imports foo.d which imports bar.d
>
> dmd app.d
> can't find module in foo.d
>
> retry:
>
> dmd app.d foo.d
> can't find module bar.d
>
> try again:
>
> dmd app.d foo.d bar.d
>
> success.
>
>
> Is it possible to cut out any one of those steps without caching
> that third dmd line? Until you try to compile foo.d, it can't
> know bar.d is required...

RDMD never needs to invoke DMD more than twice. Once to find "all" the 
dependencies, and once to do the actual compile. When DMD is run to find a 
file's dependencies, it finds the *entire* dependency graph, not just one 
step of it.





More information about the Digitalmars-d mailing list