ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Deferring references
Date Fri, 22 Sep 2006 15:15:44 GMT
--- Peter Reilly <peter.kitt.reilly@gmail.com> wrote:

> On 9/22/06, Matt Benson <gudnabrsam@yahoo.com>
> wrote:
> >
> > --- Peter Reilly <peter.kitt.reilly@gmail.com>
> wrote:
> > [SNIP]
> > > I propose that we defer handing id's until the
> > > processing
> > > stage.
> > >
> > > The change to do this is very small.
> > > [SNIP]
> > > I have have played a little with this and
> everthing
> > > seems
> > > to work fine.
> > >
> >
> > I would imagine we couldn't call this change 100%
> > guaranteed safe, but if the tests pass then I
> would
> > consider it "safe enough."  This may yield
> additional
> > benefits as well, but to avoid embarrassment if
> I'm
> > wrong I'm not going to say more until I can verify
> the
> > particular one I'm thinking of.  ;)
> 
> 
> Two testcases fail:
>   src/etc/testcases/taskdefs/delete.xml
> This uses a reference to an id defined in a task
> that
> does not get run;
> 
> <macrodef name="expectdirsonly">
>    ...
>     <resourcecount when="greater" count="0">
>               <fileset id="fs" />
>       </resourcecount>
>   ....
> </macrodef>
> 
>  <target name="test5" depends="init">
>     <delete dir="${dir}" includes="**" />
>     <expectdirsonly />
>   </target>
> 
>   <target name="test7" depends="init">
>     <delete>
>       <fileset id="fs" dir="${dir}" />
>     </delete>
>     <expectdirsonly />
>   </target>
> 
> This is highly confusing and is dependent on the
> exact
> implemention of fileset.
> 
> Changing to:
>     <resourcecount when="greater" count="0">
>               <fileset dir="${dir}" />
>       </resourcecount>
> works and is *much* easier to understand.
> 
> The other failure was:
>   src/etc/testcases/taskdefs/exec/apply
> 
>     <target name="cleanup">
>         <delete>
>             <fileset refid="xyz" />
> 
> the reference xyz is defined in an "init" target.
> 
>    <target name="cleanup" depends="init">
> makes this work.

I agree that it is counter-intuitive to expect ids to
be set by targets that never run.

-Matt

> 
> 
> Peter
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message