ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Scokart" <gscok...@gmail.com>
Subject RE: AW: extended parallelism
Date Tue, 18 Dec 2007 11:57:50 GMT
I think there is indeed plenty of build scripts that rely on the order of the target in the
depends attribute (we can
maybe even talk of pattern).  So clearly a parallelisation it must be explicit.

To make it explicit, I liked the use of '|' replacing the ',' as mentioned earlier.

However, I'm not sure that ant is ready to support multithreaded build.  We could give it
a try, but it will be a
nightmare to debug, and I'm not sure we have the right debugging tool.  

Multithread is workable in most language.  But most of the time, those languages have a strong
support for scoping
(shared object are often the exception, most manipulated object are usually local to a thread).
 In Ant the primary
things that we manipulate is the file system, the properties and the ids. All will be shared
by all the threads.


Gilles


> -----Original Message-----
> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
> Sent: mardi 18 d├ęcembre 2007 12:33
> To: user@ant.apache.org
> Subject: AW: AW: extended parallelism
> 
> > >> <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


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


Mime
View raw message