[nant-dev] Depends targets getting executed multiple times in 8.4

2003-12-08 Thread Buc



After the change to 
the explicit call behavior, now ensuring all dependencies get called, 
there has also been a change to the behavior of depends= 
arguments:

These depends 
targets now always get called also, even if already 
executed.

For 
example:

target 
name="debug" depends="onetimesetup"/

target 
name="release" depends="onetimesetup"/

running "nant debug 
release" results in onetimesetup being called for each 
target.

This is contrary to 
what I would expect "makelike" behavior to be, and also contrary to the current 
documentation for target:

"A target gets 
executed only once, even when more than one target depends on it (see the 
previous example)."

I like the change to 
call so you can more easily call targets as subroutines, but think the 
former behavior of depends= should be restored.

/ 
/br


Re: [nant-dev] Depends targets getting executed multiple times in 8.4

2003-12-08 Thread Scott Hernandez



I have committed the changes to fix this behavior. 
I will be committing tests later to confirm my expectations, and so this 
behavior doesn't change without notice again.

In short, things should work like 
this:

--Targetsspecified on the command line, or 
via the nant task, should execute like the dependencies of targets. That 
is, they should not force execution of the chain of targets.
--The call task should execute the whole 
chain of targets (including already executed dependencies)

Now, I've been told that Ant works the way that I 
would consider ours to be buggy. All targets specified on the command line are 
executed, including their dep. tree. This makes each target entry on the command 
line work like a call name="commandlinetarget". This does allow for 
something like this, "debug build release build", where you can specify that you 
want to do a debug and release build (without having to specify this in the 
build file).

Well, It is a little confusing how things should 
work, but they now work like they used to.


  - Original Message - 
  From: 
  Scott Hernandez 
  
  To: Buc ; [EMAIL PROTECTED] 
  
  Sent: Monday, December 08, 2003 11:27 
  AM
  Subject: Re: [nant-dev] Depends targets 
  getting executed multiple times in 8.4
  
  Yes, I can confirm this behavior in cvs. This is 
  a bug... :(
  
- Original Message - 
From: 
Buc 

To: [EMAIL PROTECTED] 

Sent: Monday, December 08, 2003 4:24 
    AM
    Subject: [nant-dev] Depends targets 
    getting executed multiple times in 
8.4