> From: Stefan Bodewig [mailto:[EMAIL PROTECTED] > > On Thu, 23 Oct 2003, Jose Alberto Fernandez > <[EMAIL PROTECTED]> wrote: > > > I cannot see what is the real situation that you were referring to, > > when would you be in a case where you "find a <property> > task and will > > have to search all possible scopes for a local" what are all these > > possible scopes. Can you sketch an example? > > Peter refered to the Bugzilla entry which also contains > patches for the various <ant> tasks. If you have several > nested <ant>s, you'd have to check each level for a <local> > that was in place shadowing your global value. >
But this is no more or less shadowing than me making one of the <ant> calls passing a <param> with the value of the local. The effect is exactly the same. And as any changes made by the <ant> execution will have no effect on the caller, I see no issue. > AFAIU he doesn't plan to commit that part. I think it is a mistake that <local> if local is not visible across <ant>, if that were the case then it should not be visible across <macrodef> either. If it is visible in one case, so it should in the other. Otherwise you get this extremely wird behavior: <macrodef name="m"> <echo>${p}</echo> <if> <equals arg1="${p}" arg2="my local p"/> <then> <antcall target="tm"/> </then> </if> </macrodef> <target name="x"> <local name="p" value="my local p"> <m/> </local> </target> <target name="tm"> <echo>${p}</echo> </target> <property name="p" value="my global p"/> [echo] my local p [echo] my global p How on earth by looking at "m" can you even realize what will happen in the <antcall>? You may have done many checks to properties to decide whether the antcall should be made or not, and then once you do the call, it turns out the <antcall> receives completely different properties than the one you tested. I do not know how such behavior can make sense to anyone. Jose Alberto --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]