Matt,
 
i like this idea, since these were among the first things i had to manually code into 
my nant files. specifying dependencies like this would certainly be valuable.
however, as for your first idea, i think that grouping these targets would be 
necessary in any but the most simple build files, so that nant can actually ensure 
that one of *these* targets must be done first. e.g.:
 
<group>
  <target name="debug" runbefore="build,test,deploy" />
  <target name="release" runbefore="build,test,deploy" />
</group>
 
another group might do framework selection or whatever.
 
but then you can do the same thing much easier using your 2nd idea anyway:
 
<target name="debug" provides="projectconfig" />
<target name="release" provides="projectconfig" />
 
<target name="build" depends="projectconfig" />
 
Stefan
 
--__--__--

Message: 2
Date: Fri, 21 Nov 2003 09:29:07 -0700
From: Matthew Mastracci <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [nant-dev] <target run[after|before]="..."/>

I've been thinking about some of the target dependency functionality,
and I was wondering what people thought about having some extra
specification of target ordering.  There's a couple of types in here, so
I've broken them up.  I'm interested in hearing opinions of what people
think of these.

1.  Explicit ordering of user-passed targets

One of the patterns seen in the NAnt buildfile is the "property target".
  Examples of this include the framework selection, release/debug
selection, etc.  It would be nice to specify the explicit ordering of
these targets, without introducing a dependency.  For instance,
something like this could be possible:

<target name="debug" runbefore="build,test,deploy" />
<target name="release" runbefore="build,test,deploy" />

This would tell the dependency engine that the debug/release targets
must run before any of build/test/deploy.

2.  Allowing targets to provide a virtual dependency

This would allow one or more targets to provide a "virtual" target that
could be used as a dependency in later targets.  For instance:

<target name="modulea-config1" provides="modulea" />
<target name="modulea-config2" provides="modulea" />

<target name="deploy-modulea-generic" depends="modulea" />

Any comments/suggestions/flames?  :)

Matt.


<<winmail.dat>>

Reply via email to