hi all,

I think there's a problem with the ASIS attribute of file sets.  Either that
or I have a lingering misunderstanding about what it is supposed to do.

In version 0.8.01, when I use the ASIS file set attribute, incremental
builds don't happen.  For example, in building a dll:

<csc ...>
        ...
        <sources>
                <includes file="test1.cs" asis="true" />
                ...
        </sources>
</csc>

clean compiles work ok, but when I touch test1.cs and build again, the dll
should but does not get rebuilt.

thanks,

Bruce

-----Original Message-----
From: Hearn, Bruce [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 9:35 AM
To: [EMAIL PROTECTED]
Subject: RE: [Nant-users] missing source file does not break the build


Ian,

This is closer to what I need.  I had a quick look around in the user
documentation, but could not find this tag.  Is this a feature of file sets
in general?

This does break the build properly in the 0.08 release, but unfortunately
CSC goes ahead and generates a DLL nonetheless.  That causes the subsequent
incremental builds to succeed.  So this error will not be caught in an
incremental build server more than once.  Too bad, but once is better than
nothing.

thanks,

Bruce

-----Original Message-----
From: Ian MacLean [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 5:27 PM
To: Hearn, Bruce
Cc: [EMAIL PROTECTED]
Subject: Re: [Nant-users] missing source file does not break the build


Bruce,
By default the fileset element only includes files that exist. That is 
to support wildcard matching. So if you had <includes name = "*.cs"/> 
class1.cs wouldn't match either. However to get the result you're after 
use the asis attribute. so:

   <sources>
        <includes name="class1.cs" asis="true" />
        <includes name="class2.cs" />
     </sources>

will pass class1.cs thru to the compiler without checking for existence 
first.

Ian
> when NANT contains a csc project with the following lines:
> 
> <csc ...>
> ...
>    <sources>
>       <includes name="class1.cs" />
>       <includes name="class2.cs" />
>    </sources>
> </csc>
> 
> If the file class1.cs file is not present on disk, no error message is
> generated.  The project will compile with only class2.cs.  The absence of
> class1 will only be noticed when another project that references class1 is
> built - and fails.
> 
> This can easily happen if someone forgets to check a new file into source
> control.  It seems to me that NANT should break the build when this
happens,
> rather than try to compile whatever files are present.  This would make it
> much easier to find such problems where they occur.
> 
> Is there a way to force NANT to break the CSC task when a source file is
> missing?
> 
> thanks,
> 
> Bruce
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to