Bugs item #1474159, was opened at 2006-04-21 13:50 Message generated for change (Comment added) made by mike_at_rubicon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1474159&group_id=31650
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Tasks Group: 0.85 Status: Closed Resolution: Invalid Priority: 5 Submitted By: [EMAIL PROTECTED] (mike_at_rubicon) Assigned to: Gert Driesen (drieseng) Summary: Call Target and cascade=false prevents target re-execution Initial Comment: When I set the cascade flag to flase on the call task, the called target it self is not re-executed. <project default="build"> <target name="init" /> <target name="compile" depends="init" /> <target name="build"> <call target="compile" cascade="false" /> <call target="compile" cascade="false" /> </target> </project> Expected behavior: build: init: compile: compile: Actual behavior: build: init: compile: I'm using the nightly from 2006-03-08 I believe it's a problem in Project.cs public void Execute(string targetName, bool forceDependencies) lines 884 and 885 if (forceDependencies || !currentTarget.Executed) { currentTarget.Execute(); } currentTarget will eventually end up being the called target, and its execution state is checked just like if its another of the depended targets. ---------------------------------------------------------------------- >Comment By: [EMAIL PROTECTED] (mike_at_rubicon) Date: 2006-05-01 20:21 Message: Logged In: YES user_id=1505249 --- From the remarks section --- When the CallTask is used to execute a target, both that target and all its dependent targets will be re-executed. To avoid dependent targets from being executed more than once, two options are available: ... Set the CascadeDependencies attribute to false. --- This remark never states that the actual called target will not be re-executed. Admittedly, it also doesn't say otherwise ;) More important, the example on compiling a debug and a release build shows that the called target should be re-executed: --- From the example in the xml comment --- /// <project default="build"> /// <property name="debug" value="false" /> /// <target name="init"> /// <echo message="initializing" /> /// </target> /// <target name="compile" depends="init"> /// <echo message="compiling with debug = ${debug}" /> /// </target> /// <target name="build"> /// <property name="debug" value="false" /> /// <call target="compile" /> /// <property name="debug" value="true" /> /// <call target="compile" /> /// </target> /// </project> ... /// The CascadeDependenciesparameter of the CallTask /// defaults to true, causing the "init" target to be /// executed for both the "debug" and "release" build. ... /// build: /// init: /// [echo] initializing /// compile: /// [echo] compiling with debug = false /// init: /// [echo] initializing /// compile: /// [echo] compiling with debug = true /// BUILD SUCCEEDED ... /// If the "init" should only be executed once, set the /// CascadeDependencies attribute of the CallTask to false. ... /// build: /// init: /// [echo] initializing /// compile: /// [echo] compiling with debug = false /// compile: /// [echo] compiling with debug = true /// BUILD SUCCEEDED --- What I interpret into this piece of documentation: "Compile" is executed using the CallTask. And with cascade set to false, the example's output shows that "compile" should be re-executed, and only "init", on which "compile" depends on, would not be re-executed. But the actual code, and your explaination, indicate that compile shouldn't be re-executed either. So the second part of the example and the code contradict each other and should be brought back into sync. ---------------------------------------------------------------------- Comment By: Gary Feldman (garyfx) Date: 2006-05-01 19:48 Message: Logged In: YES user_id=847172 The internal documentation in CallTask.cs looks correct to me, which is not to say it couldn't be made clearer. Exactly which sentence or sentences are you interpreting as saying the opposite? ---------------------------------------------------------------------- Comment By: [EMAIL PROTECTED] (mike_at_rubicon) Date: 2006-05-01 16:32 Message: Logged In: YES user_id=1505249 Thanks for clarifying. May I recommend updating the call-task's xml-comment, because it explicitly states otherwise. ---------------------------------------------------------------------- Comment By: Gert Driesen (drieseng) Date: 2006-05-01 16:16 Message: Logged In: YES user_id=707851 This is actually by design. The <call> task will not re- execute a target unless "cascade" is set to "true". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1474159&group_id=31650 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers