You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Chris Shabsin <cr...@MIT.EDU> on 2005/01/13 16:00:41 UTC

filter loops in 1.6.2

In versions of Ant prior to 1.6.2 it was possible to use filters to 
modify a token found in a file.  For example:

<filterset begintoken="/" endtoken="/">
  <filter token="etc" value="/local/etc/"/>
</filterset>

In 1.6.2, the fixed bugs list includes the entry:

    * replacestring tokenfilter only replaced the first occurrence.

And, lo and behold, attempting to run this filter in 1.6.2 now gives:

[copy] Infinite loop in tokens. Currently known tokens : [etc]

Would it be possible to make the filtering continue after the last 
replacement, rather than start over at the beginning of the line, to 
make such a replacement possible again?  It seems pretty clear that no 
one would ever intend to create an infinite loop of token replacements, 
so ignoring occurrences of the token within the replacement text from 
the filter should be safe.

Sorry if this has been covered before, but I did a couple searches on 
the archives and found no other mention of this question since 1.6.2 
came out.

-Chris Shabsin


Re: filter loops in 1.6.2

Posted by Matt Benson <gu...@yahoo.com>.
--- Chris Shabsin <cr...@MIT.EDU> wrote:
> >It may be that what you are looking for is an
> option
> >to turn off recursive token expansion in
> filtersets. 
> >Does this sound correct?
> >  
> >
> Yes, that's precisely what I need. 
> 
This will be in Ant 1.6.3 .

-Matt

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



		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 

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


Re: filter loops in 1.6.2

Posted by Chris Shabsin <cr...@MIT.EDU>.
Matt Benson wrote:

>According to CVS, this behavior should be evident in
>Ant >= 1.5.1 .
>  
>
Sorry; I made the assumption when I saw a change entry that seemed to 
match what I was seeing; we have an old version of Ant that our build 
system uses, and I didn't think to see just how far back the problem 
actually went.  Thank you for tracking this down.

>>Would it be possible to make the filtering continue
>>after the last 
>>replacement, rather than start over at the beginning
>>of the line, to 
>>make such a replacement possible again?  It seems
>>    
>>
>It may be that what you are looking for is an option
>to turn off recursive token expansion in filtersets. 
>Does this sound correct?
>  
>
Yes, that's precisely what I need. 

-Chris


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


Re: filter loops in 1.6.2

Posted by Matt Benson <gu...@yahoo.com>.
--- Chris Shabsin <cr...@MIT.EDU> wrote:

> In versions of Ant prior to 1.6.2 it was possible to
> use filters to 
> modify a token found in a file.  For example:
> 
> <filterset begintoken="/" endtoken="/">
>   <filter token="etc" value="/local/etc/"/>
> </filterset>
> 
> In 1.6.2, the fixed bugs list includes the entry:
> 
>     * replacestring tokenfilter only replaced the
> first occurrence.

This change relates not to filtersets, but to the
tokenfilter filter reader.
> 
> And, lo and behold, attempting to run this filter in
> 1.6.2 now gives:
> 
> [copy] Infinite loop in tokens. Currently known
> tokens : [etc]

According to CVS, this behavior should be evident in
Ant >= 1.5.1 .

> 
> Would it be possible to make the filtering continue
> after the last 
> replacement, rather than start over at the beginning
> of the line, to 
> make such a replacement possible again?  It seems

It may be that what you are looking for is an option
to turn off recursive token expansion in filtersets. 
Does this sound correct?

-Matt


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

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