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=22759>. 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=22759 antcall at top level causes infinite loop Summary: antcall at top level causes infinite loop Product: Ant Version: 1.1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] A brief search didn't turn up any bugs with "infinite" and "loop" that seemed to relate to antcall... I havn't looked into the code to see why this happens, but it seems that antcall is calling the entire buildfile again, to look for the target named foo. In doing so I suspect it is required to process all top level information, including itself creating the loop. This file: <project name="test"> <antcall target="foo"/> <target name="foo"> <echo>Foo called</echo> </target> </project> Causes this infinite loop: [EMAIL PROTECTED] projects]$ ant -v -f test.xml Apache Ant version 1.6alpha compiled on August 11 2003 Buildfile: test.xml Detected Java version: 1.4 in: /usr/java/j2sdk1.4.2/jre Detected OS: Linux parsing buildfile /home/gus/projects/test.xml with URI = file:///home/gus/projects/test.xml Project base dir set to: /home/gus/projects Project base dir set to: /home/gus/projects [antcall] calling target foo in build file /home/gus/projects/test.xml parsing buildfile /home/gus/projects/test.xml with URI = file:///home/gus/projects/test.xml Project base dir set to: /home/gus/projects Project base dir set to: /home/gus/projects [antcall] calling target foo in build file /home/gus/projects/test.xml parsing buildfile /home/gus/projects/test.xml with URI = file:///home/gus/projects/test.xml Project base dir set to: /home/gus/projects Project base dir set to: /home/gus/projects [antcall] calling target foo in build file /home/gus/projects/test.xml parsing buildfile /home/gus/projects/test.xml with URI = file:///home/gus/projects/test.xml (repeats infinitely) I am a little supprised this hasn't poped up before, but I ran into it when I tried to devise a build that checked to see if libs were in the right place and if not, attempt to get them from likely locations before proceeding. I was antcalling a target that had an unless"foolib.exists" (set or not set by available). I think one can workaround this by putting all the toplevel stuff in an explicit init target, but if all tasks are to work on the top level, it would seem that antcall needs to be fixed. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
