On 06/14/2011 09:29 PM, Nick Sabalausky wrote:
"Adam D. Ruppe"<[email protected]>  wrote in message
news:[email protected]...
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

Reply via email to