ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: [Patch] Target attribute property expansion
Date Thu, 05 Jul 2001 09:27:38 GMT
On Thu,  5 Jul 2001 18:24, Stefan Bodewig wrote:
> On Thu, 5 Jul 2001, Peter Donald <donaldp@apache.org> wrote:
> > I actually think that we should do lazy evaluation of the DAG. ie
> > only look up next element in DAG as we "get" to it.
>
> Could you please explain how this should work?  I'm not sure I know
> what you mean by "look up" and "get to" in this context.

Well just say user passes in target foo on command line. It depends on target 
bar and bar depends on baz. So first we look up foo. It is present so there 
is no error. We find it's dependencies (just bar) and look that up. We find 
target bar and it is present. We then lookup it's dependencies (ie baz) and 
find they are not present so we trigger an error there and not at 
"precompile" stage.

We also keep a stack of path to current current target so that we can detec 
circular dependencies etc.

> > This is for two reasons mainly;
>
> You mention three 8-)

so I failed preschool maths ;)

>
> > 1. Support crazy self-modifying projects like Jose wanted
>
> He did?

his projectref ideas.

> > 2. Not force the loading of all project files at startup
>
> If we allow targets in the main file to depend on targets in other
> files, we'll have to load and parse this other file anyway, don't we?

nope - not if they are never executed. So if target foo depend on project1s 
target bar but target foo is never "executed" then we shouldn't have to load 
and parse project1.

This is essentially designed for large projects. I was talking to some peeps 
how they arrange a sprawling build system for a massive project and that was 
one of the optimizations that was essential for them to achieve reasonable 
build times.

> > 3. Cutdown on redundent scanning at start that is not needed and
> > costly in large projects
>
> Scanning for what?  If you are talking about not searching for cycles
> in the dependency graph that we are never going to touch, that is fine
> with me.

That aswell as scanning for existence. For instance if target foo is never 
called then we shouldn't be checking it's dependencies are OK.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

Mime
View raw message