ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: AW: extended parallelism
Date Tue, 18 Dec 2007 11:33:20 GMT
> >> <target name="a" depends="b,c,d"/>
> >> If such a dependency did exist, it should be incorporated in 
> >> the depends attribute of the 'b' & 'c' target declarations.
> > 
> > Thats the meaning - unordered list.
> > 
> > 
> >> Assuming in the example above that targets b, c & d have no 
> >> dependencies of their own, they should be eligable for 
> >> parallel execution automatically without any need for 
> >> additions to the syntax.
> > 
> > Thats the ParallelExecutor implementation ;)
> > 
> >
> 
> Hmm, interesting view. I was under the impression that there is an
implicit 
> order of the targets listed in the "depends" attribute. Two sentences
in [1] 
> suggest the same:
> 
>       [...]
> 
>       Ant tries to execute the targets in the depends attribute
>       in the order they appear (from left to right)
> 
>       [...]
> 
>       It is a good practice to place your tstamp tasks in
>       a so-called initialization target, on which all other
>       targets depend. Make sure that target is always the
>                                 ^^^^^^^^^^^^^^^^^^^^^^^^^
>       first one in the depends list of the other targets.
>       ^^^^^^^^^
>       In this manual, most initialization targets have
>       the name "init".
> 
>       [...]


Oh, have to have a look at that. If I change the semantic this has to be
made explicit ...
(It can be done because you have to specify the executor for your own
...)

"Ant tries to execute the targets in the depends attribute in the order
they appear (from left to right)." [1].
Ant 'tries' - so I wouldnt rely on that ... ;)
Especially if you read the example direclty under that: the order doesnt
matter if the dependend targets have dependencies for their own.


The note about the "init" target is an old one - not invalid, but no
more needed: you can place tasks directly under <project> (since 1.6).
The next two sentences "always first element in depends clause" + "in
the depends clause of each target" are redundant: if I specify that init
in each target, it does not matter where I put it in the depends-list.


Target.setDepends(String s): (basically)
  List deps;
  for(String s2 : s.split(",")) {
    deps.add(s2);
  }


Manual is not clear (as clear in a "specification") but the code sais
that there is an order.
So I would just document that. It is the users possibility of using the
executor or not.

Or do you have another idea for parallelizing?



Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message