----- Original Message ----- 
From: "Ian MacLean" <[EMAIL PROTECTED]>
To: "Gert Driesen" <[EMAIL PROTECTED]>
Cc: "Scott Hernandez" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, March 04, 2003 9:10 AM
Subject: Re: [nant-dev] Available task


> Gert Driesen wrote:
> > As agreed, I implemented an Available task that allows you to check for
the
> > available of a file or directory resource.
> >
>
> > eg. <available type="File" resource="myfile.txt"
property="myfile.present"
> > />
> >
> > I used "resource" instead of "file" (or "directory") for the attribute
name,
> > so we can add more resource checks (for registry key, registry value,
.NET
> > runtime, ....) later without having to add a attribute for each type of
> > check.
> Sounds good - we can use the FrameworksCollection I've just added to do
> the lookup for existence of a runtime/framework.

Too bad you don't allow a runtime to be specified on a task instance ... but
you did a great  job for sure !!!

Is it possible right now to set a runtime that is defined in the settings
file but that doesn't exist on the system ?  how will Nant react to that ?

>
> > I would prefer to be able to use lower case values in the buildfiles,
but
> > enum members should use Pascal casing and Nant uses a case-sensitive
enum
> > parsing so you have to specify the values in pascal casing too in the
> > buildfile (should we change the behaviour to use a case-insensitive
lookup
> > for enum members) ?
> we could do - or we could un camel case them in the Enum definition.
> Yeah, I know its good practice to use camel case and fxCop will bitch
> but we have a specific reason for doing it and you get better validation
> in the build file - ie non lower case values wiull be rejected.

Other tasks already use Pascel casing (eg. the foreach task), so we could
leave it like it is for now

>
>
> > However, I don't know how the task should behave when a file or
directory is
> > not found : should I set the specified property to false or should it
not
> > set the property at all (this is how ant works) ?  If I don't set the
> > property to a value, then I don't think you can use it in the "if" and
> > "unless" attributes and stuff, because NAnt doesn't handle this very
well
> > yet.
> >
> > I already proposed to Ian a while ago, to consider a property, that has
not
> > been set to a value, to have the value "false".  I know he changed this
> > behaviour locally, but I don't know if he committed this change already
or
> > if he's planning to commit it anyway.
> >
>
> That not quite what the proposal was. It was to allow the referencgin of
> properties in if attributes without the ${} syntax. And then return true
> if the property exists and is set to true otherwise false.
>
> I was holding off on this because I was wanting to see what Gerrys
> expression evaluation implementation was going to look like. Since it
> seems he is in no hurry to commit that I'll o some testing and then add
> it in.

I seem to remember that we also discussed whether a property that has not
been set should be considered to have the value "false" when used in an if /
unless attribute ...

But I could be wrong ...

Should we leave it like it is then : set it to true when resource is
available and set it to false when it's not available ?

Gert



-------------------------------------------------------
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