As the original poster of the case-sensitive question,
I may as well chime in with my two cents.

Generally, people seem to agree that having a
case-insensitive option is a good thing, which is
great. After wasting half an hour trying to figure out
why my build file wasn't working, only to find out
that it was because file names were case-sensitive,
I'd be happy if other people were spared that hassle.
We Windows folk are deeply indoctrinated with
case-insensitive filenames, and the thought that it
could behave otherwise never really crossed my mind.

As for the mechanism for configuring case-sensitivity,
I'm not sure I'm crazy about the fileset attribute
option, for a couple of reasons:

1) Case-sensitivity/insensitivity isn't really a
project or fileset issue, it's an environment issue.
The file system that you're running on either is or
isn't case-sensitive, and that fact isn't really
coupled to the definition of the fileset. 

2) Having to set an option on each fileset would be
onerous - after all, if I'm working with a
case-insensitive platform, why introduce the risk of
missing a setting and therefore breaking things. It
just increases the chance for user error.

3) If you truly want platform-independence, then
wouldn't it be better to not force people to change
their build files based on the platform that they are
on?

Obviously, the ideal solution would be for Nant to
detect whether the file system is case-sensitive an
adjust accordingly. However, I don't know of a generic
way to discover that in .Net. You can P/Invoke a call
to the Win32 function GetVolumeInformation, but that
would be decidedly platform-dependent.

I guess my second choice would be an app.config type
setting, which would be global. However, as far I've
seen, Nant doesn't use a config file for anything at
this point, so I don't know if that's a solution that
would be considered.







---------------------------------------------
Upon reflection, I will agree that a global variable
does pollute too much.
 Putting it at the FileSet level is a good place.
 
 However, I'm not clear on your opinion on the default
behavior in case the attribute is not
specified.
 I'm going to assume that you believe the default
behavior should be case sensitive
regardless of platform.
 
 If that is the case, I disagree, but offer a
suggestion which may provide a middle ground.
 How about if the behavior is thus:
 On a case-sensitive OS it is just that, case
sensitive.
 On a case-insensitive OS, the default is case
insensitive, BUT with a very apparent nant
warning at build time if the default had to be used
and case sensitivity consideration was
required to match the source files with the fileset
patterns.
 
 
 ____________
 Andy Smith
 Chief Code Monkey 
 
 -----Original Message-----
 From: Gerry Shaw [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 09, 2002 12:57 PM
 To: Andy Smith; [EMAIL PROTECTED]
 Subject: RE: [nant-dev] RE: FileSet question - need
feedback
 
 
 > Stated simply, the question was why is a fileset
case sensitive, 
 > as it seemed like incorrect behavior to the
developer who asked 
 > the question.
 >
 > My opinion is that this is, indeed, incorrect
behavior.
 > The fact that a filename matches on one OS and
doesn't on the 
 > other, does not mean that one is _wrong_ it means
that they 
 > are _different_. Arbitrarily choosing to break the
semantics 
 > for one OS is unfair to the developers working on
that 
 > platform. Choosing to break the semantics of the
by-far 
 > majority OS seems more like an emotional decision
rather than 
 > a logical one.
 > 
 > My proposed solution is to offer a project level
option ( 
 > hopefully set in the .build file and overridden
with a 
 > command line option ) which decides the case
sensitivity 
 > issue. If the option is not set, then it should
behave 
 > according to the rules of the OS. With this, then
developers 
 > who know they will be dealing with build files on
different 
 > OS's ( which I'm willing to bet is a very uncommon
scenario ) 
 > could enforce Unix restrictions on windows
machines.
 
 
 My suggestion is to add a casesensitive="true|false"
attribute to the
 fileset element.  This seems like a reasonable
compromise that doesn't
 polute the rest of nant with a global variable. I
shun the idea of
 adding a special global setting for this because it
just opens the doors
 to a zillion other options.  
 
 I also like the idea that it's a bit of a pain to do
because you really
 should treat files as case sensitive and it might
make people think its
 easier to just clean up their file set patterns then
to add this switch.
 
 A huge benefit for nant is that it can make cross
platform build files
 from the start.  Once you make a buildfile you don't
have to worry about
 it working on a different platform you haven't tested
on - it should
 just work.  Without this we might as well go back to
writing shell
 scripts.
 
 That said I'm still open to other opinions and would
like to hear what
 other people think.
 
 
 
 
 
 
 
 
 From
 


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

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

Reply via email to