ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6391] - Ant doesn't detect circular "depends" within an antcall.
Date Mon, 18 Feb 2002 10:39:45 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6391>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6391

Ant doesn't detect circular "depends" within an antcall.





------- Additional Comments From gb@opengroup.org  2002-02-18 10:39 -------
This seems a bit of a cop-out...

I can think of lots of potential ways out, for instance:

   1.  Acknowledge that this can happen and provide loop detection and 
   allow an attribute either on "target" or "antcall" that will then 
   allow Ant to break out after a specific number of loops, this would
   then allow Users who want to loop loop.  i.e. have:
       <antcall loops="5"...

   2.  Provide a warning before execution begins to indicate that a loop
   could occur, based purely on the antcall targets and depends list.
   It is then up to the User to decide whether they keep processing.

   3.  If you are in a loop then, in general, you have evaulated all the
   properties and you should then be able to detect the loop, i.e. determine
   whether you would execute the loop again since the property is unlikely 
   to change.  If you loop twice then you can be pretty sure that the property
   that governs entry into the loop would not change.

   4.  Do a "dummy" pass through the targets to try and evaluate the
   properties, since the properties can be evaluated this should be possible.

Not sure why the Halting Problem applies here since Ant is the one who is 
executing the commands.  It is not Ant itself that would loop but the commands 
it executes...this is a different matter and the Halting Problem should not 
apply.

My preference is for option 3, so that a warning is output to indicate that it 
MAY occur...if the User then wants to ignore it then that's fine...

It seems a bit of a poor side-step to just say that "it can't be fixed", so 
don't fix the specific problem, just provide Users with more 
information...that's better than saying we have to re-write Computer Science 
theory...

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


Mime
View raw message