From: Giuseppe G. <giu...@ag...> - 2004-03-06 00:08:53
|
Gert, this new patch should be OK. By the way, I've noticed something very strange; to avoid the infinite loop, I've just modified the code at line 782 from do { currentTarget = (Target) sortedTargets[currentIndex++]; if (currentTarget.Name.Equals(WildTarget) && _currentTarget != null) { currentTarget.Name = _currentTarget.Name; } _currentTarget = currentTarget; // only execute targets that have not been executed already, // if we are not forcing. if(forceDependencies || !_currentTarget.Executed) { _currentTarget.Execute(); } } while (!_currentTarget.Name.Equals(targetName)); ... to do { currentTarget = (Target) sortedTargets[currentIndex++]; if (currentTarget.Name.Equals(WildTarget) && CurrentTarget != null) { currentTarget.Name = CurrentTarget.Name; } _currentTarget = currentTarget; // only execute targets that have not been executed already, // if we are not forcing. if(forceDependencies || !currentTarget.Executed) { currentTarget.Execute(); } } while (!currentTarget.Name.Equals(targetName)); Strange, isn't it? ...again, wild targets are nothing impressive, but I think they would be very helpful when writing gateway build files (no need of additional properties just to forward target names); furthermore, as already said, it would be possible to define a target that is executed when the user specifies a target that does not exist in the current build file... j3d. On Fri, 2004-03-05 at 20:50, Gert Driesen wrote: > Giuseppe, > > There appears to be a problem with your changes. Have you tried applying the > patch against NAnt cvs ? > > NAnt seem to get stuck in an infinite loop, I'll look into it if you want > ... > > Regardless of this, I'd like to get feedback from other members of the > community before committing your patch. I don't mind committing the new > target::get-current-target function, but I'm not sure about the wildcard > target support ... > > Gert > > ----- Original Message ----- > From: "Giuseppe Greco" <giu...@ag...> > To: "NAnt Developers" <nan...@li...> > Sent: Thursday, March 04, 2004 5:02 PM > Subject: [nant-dev] Patch > > > > Hi all, > > > > attached to this email you will find the patch > > I promised yesterday. > > > > Now, it's up to you... > > > > j3d. > > > > -- > > ---------------------------------------- > > Giuseppe Greco > > > > ::agamura:: > > > > phone: +41 91 604 67 65 > > mobile: +41 76 390 60 32 > > email: giu...@ag... > > web: www.agamura.com > > ---------------------------------------- > > -- ---------------------------------------- Giuseppe Greco ::agamura:: phone: +41 91 604 67 65 mobile: +41 76 390 60 32 email: giu...@ag... web: www.agamura.com ---------------------------------------- |