DIP11: Automatic downloading of libraries

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jun 14 21:49:21 PDT 2011


On 06/14/2011 09:29 PM, Nick Sabalausky wrote:
> "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.

It can do so because all files are present. The remote tool can't do that.

Andrei



More information about the Digitalmars-d mailing list