Its probably a good idea. The only issue is that you may get weird behaviour if the includes don't happenin quite the orderyou expect.
ie include file 'a' but its already been included by file 'b' which overrides some of its properties. Still thats pretty much how c includes work ( with header guards ).
so the answer is yes we should allow a file to be included multiple times but only the first one will actually be included.


Ian

Was there ever any decision on this?  IMO allowing multiple includes makes
managing multiple build files much easier.

brant
...


----- Original Message ----- From: "Gert Driesen" <[EMAIL PROTECTED]> To: "Brant Carter" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, August 15, 2003 1:40 AM Subject: Re: [nant-dev] IncludeTask / failonerror




Hi Brant,

The IncludeTask already supports failonerror, as support for failonerror


is


implemented in the Task base class. I did make some minor modifications
just now that will make it more clear as to what is causing the include


task


to fail.

Ian, should we allow a file to be included twice (well actually just once,
but throw no exception when the same file is mapped again) ?

Currently, in LocationMap there's a check that prevents such a scenario :

if (_fileMap.ContainsKey(fileName)) {
throw new


ArgumentException(string.Format(CultureInfo.InvariantCulture,


"XML document '{0}' has already been mapped.", fileName));
}

Gert

----- Original Message -----
From: "Brant Carter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 14, 2003 11:24 PM
Subject: [nant-dev] IncludeTask / failonerror




I have been setting up my build files and noticed that the include task


does


not support the failonerror attribute properly.

I have the following situation I am trying to support.

common.build : common stuff
sub.build : a subsystem build file, includes common.build
master.build : the main build file, includes common.build, sub.build

the include task was busting since common.build is included in both


spots.


Adding a failonerror=false and changing the following code in the
IncludeTask seemed to have fixed the problem.

can I get this change committed?

b

protected override void ExecuteTask() {
// push ourselves onto the stack (prevents recursive


includes)


           string includedFileName =
Path.GetFullPath(Path.Combine(_currentBasedir, BuildFileName));
           _includedFileNames.Push(includedFileName);
           _nestinglevel ++;

           Log(Level.Verbose, LogPrefix + "Including file {0}.",
includedFileName);
           string oldBaseDir = Project.BaseDirectory;

           // set basedir to be used by the nested calls (if any)
           _currentBasedir = Path.GetDirectoryName(includedFileName);

           try {
               XmlDocument doc = new XmlDocument();
               doc.Load(includedFileName);
               Project.InitializeProjectDocument(doc);
           } catch (BuildException) {
if (FailOnError) {
throw;
}
           } catch (Exception e) {
if (FailOnError) {
throw new BuildException("Could not include build file " +
includedFileName, Location, e);
}
           } finally {
               // pop off the stack
               _includedFileNames.Pop();
               _nestinglevel--;

                // reset base\dir
               _currentBasedir = oldBaseDir;
          }
       }





From: Ian MacLean <[EMAIL PROTECTED]>
To: Brant Carter <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: [nant-dev] Re: NAntContrib Source
Date: Wed, 13 Aug 2003 13:19:37 +0900

You can grab it from anonymous nantcontrib cvs using

cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/nantcontrib login

cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/nantcontrib


co -r


BRANCH-083 NAntContrib

NAntContrib source isn't bein distributed with the 0.83 release.

Ian



Where can I get the NAntContrib source that is being use for the 0.83
release.  I downloaded the source for NAnt and the binaries are in the
\bin folder.  The nightly builds for NAntContrib aren't correct.  If
someone has these files that would be appreciated.

thanks

brant

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963





-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.


http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01


_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.



http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01


_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers








---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 8/5/2003


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers






-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to