RE: [nant-dev] patch for FileSet extension

2005-05-06 Thread Martin Aliger
Interesting.  I think there is an opportunity for optimizing this, to
eliminate the asis by changing the synchronization point.
For example, if the contents of the foo1 fileset were not computed until
actually needed, then you could do away with the asis and apply the exclude.

I'm not sure I want change something in such fundamental thing as fileset.
Simple extension should be ok, but change some functionality... I dont want
change whole NAnt, I just want to contribute small enhancement which I find
very useful. Since I dont use asis myself I dont know what for hacks it
could be good.

To your second note: filesets are computed lazily - that means when they
used for first time. There are some issues about it (like creating fileset
then deleting some files and wondering why their names are not stored in
fileset!). Merge operation is use of fileset, so I explicitelly scan it. Its
real need becouse of merging two filesets with distinct basedirs.

 What happens if you remove the implicit asis that you 
 generate, and instead insert explicit asis attributes into 
 the foo1 fileset?  

It workes well (except doubling bug 1195736), excludes working. Only issue
is that every file from merged fileset is scanned twice. Its not big
performance issue, imo, since scan pathed file is just test for file
existence. I'll make some more testing with this config and let you know.

 (Regardless of what the decision is, the test cases need to 
 include all combinations of asis, include, exclude, fromdir, 
 relative basedir, absolute basedir, and omitted basedir.)

That would be really nice. Unfortunatelly possible combinations grow with
factorial - noone have time to write all those testcases. But I'll try to
write a little more of them.

Martin



---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers


RE: [nant-dev] patch for FileSet extension

2005-05-06 Thread Gert Driesen
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Martin Aliger
 Sent: vrijdag 6 mei 2005 11:54
 To: 'Gary Feldman'; [EMAIL PROTECTED]
 Subject: RE: [nant-dev] patch for FileSet extension
 
 Interesting.  I think there is an opportunity for optimizing this, to
 eliminate the asis by changing the synchronization point.
 For example, if the contents of the foo1 fileset were not 
 computed until
 actually needed, then you could do away with the asis and 
 apply the exclude.
 
 I'm not sure I want change something in such fundamental 
 thing as fileset.
 Simple extension should be ok, but change some 
 functionality... I dont want
 change whole NAnt, I just want to contribute small 
 enhancement which I find
 very useful. Since I dont use asis myself I dont know what 
 for hacks it
 could be good.
 
 To your second note: filesets are computed lazily - that 
 means when they
 used for first time. There are some issues about it (like 
 creating fileset
 then deleting some files and wondering why their names are 
 not stored in
 fileset!). Merge operation is use of fileset, so I 
 explicitelly scan it. Its
 real need becouse of merging two filesets with distinct basedirs.
 
  What happens if you remove the implicit asis that you 
  generate, and instead insert explicit asis attributes into 
  the foo1 fileset?  
 
 It workes well (except doubling bug 1195736), excludes 
 working. Only issue
 is that every file from merged fileset is scanned twice. Its not big
 performance issue, imo, since scan pathed file is just test for file
 existence. I'll make some more testing with this config and 
 let you know.
 
  (Regardless of what the decision is, the test cases need to 
  include all combinations of asis, include, exclude, fromdir, 
  relative basedir, absolute basedir, and omitted basedir.)
 
 That would be really nice. Unfortunatelly possible 
 combinations grow with
 factorial - noone have time to write all those testcases. But 
 I'll try to
 write a little more of them.

I think you should await consensus that this feature is indeed necessary,
and as such will end up in NAnt cvs.

Gert



---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] patch for FileSet extension

2005-05-06 Thread Gary Feldman
Martin Aliger wrote:
(Regardless of what the decision is, the test cases need to 
include all combinations of asis, include, exclude, fromdir, 
relative basedir, absolute basedir, and omitted basedir.)
   

That would be really nice. Unfortunatelly possible combinations grow with
factorial - noone have time to write all those testcases. But I'll try to
write a little more of them.
 

It's not that many test cases, particularly since you can test different 
combinations of include within one fileset and you can repeat the 
contents of the fileset for different basedirs - maybe a dozen or two. 

In any event, tests aren't optional.  Without the tests, you can't be 
sure of the behavior in these cases, and if you're not sure, it's not 
ready to ship.

Gary

---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers


RE: [nant-dev] patch for FileSet extension

2005-05-06 Thread Martin Aliger
 I think you should await consensus that this feature is 
 indeed necessary, and as such will end up in NAnt cvs.

That is what I'm waiting for. If more test-cases or some fine-tuning (like
no 'asis') will be needed, I'll do it. That is also reason why I dont want
change alot of things, just extend one feature.

I hope, you'll like it. I dont read every message on list, but I saw there
already some requests about such functionality.

Regards,
Martin



---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers


RE: [nant-dev] patch for FileSet extension

2005-05-05 Thread Martin Aliger
Hi Gary,

as I implemented it, it converts scanned files from first fileset to full
path asis includes. So

fileset id=foo1 basedir=X:\nant\t1
include name=world.peace /
include name=world.war/
/fileset
fileset id=foo2 basedir=X:\nant\t1
includesfileset refid=foo1/
exclude name=world.war/
include name=reefer.saddness /
/fileset
becomes
fileset id=foo2 basedir=X:\nant\t1
include asis=true name=X:\nant\t1\world.peace/
include asis=true name=X:\nant\t1\world.war/
exclude name=world.war/
include name=reefer.saddness /
/fileset

To your question with excludes:
- all excludes in foo1 are respected.
- no exclude in foo2 take effect on included files. Thats something which is
already in place. Excludes do _not_ affect asis includes. It sounds a little
strange to me, but I'd rather not change something what is in place for
several years.

Is this behaviour right? Maybe yes. I think about includesfileset like
fileset merging operation - so you merge existing fileset with some
include/exclude mask. But I see, there is no way how to filter out existing
fileset to another one... So maybe its not right way? Ideas?

Note: reason why I used asis is to prevent double-scan. asis includes are
not scanned anymore, and all included files via includesfileset was scanned
once already.


Martin Aliger



---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] patch for FileSet extension

2005-05-05 Thread Gary Feldman
Martin Aliger wrote:
Hi Gary,
as I implemented it, it converts scanned files from first fileset to full
path asis includes. So
fileset id=foo1 basedir=X:\nant\t1
include name=world.peace /
include name=world.war/
/fileset
fileset id=foo2 basedir=X:\nant\t1
includesfileset refid=foo1/
exclude name=world.war/
include name=reefer.saddness /
/fileset
becomes
fileset id=foo2 basedir=X:\nant\t1
include asis=true name=X:\nant\t1\world.peace/
include asis=true name=X:\nant\t1\world.war/
exclude name=world.war/
include name=reefer.saddness /
/fileset
To your question with excludes:
- all excludes in foo1 are respected.
- no exclude in foo2 take effect on included files. Thats something which is
already in place. Excludes do _not_ affect asis includes. It sounds a little
strange to me, but I'd rather not change something what is in place for
several years.
Is this behaviour right? Maybe yes. I think about includesfileset like
fileset merging operation - so you merge existing fileset with some
include/exclude mask. But I see, there is no way how to filter out existing
fileset to another one... So maybe its not right way? Ideas?
Note: reason why I used asis is to prevent double-scan. asis includes are
not scanned anymore, and all included files via includesfileset was scanned
once already.
 

Interesting.  I think there is an opportunity for optimizing this, to 
eliminate the asis by changing the synchronization point.  For example, 
if the contents of the foo1 fileset were not computed until actually 
needed, then you could do away with the asis and apply the exclude.

Part of the problem is that asis seems to violate the principle of one 
method/class/object/parameter should do one thing.  It's doing three 
things:  suppressing the existence check, suppressing the application of 
excludes, and suppressing the pattern matching (in case you were on a 
file system silly enough to allow asterisks in the file name).  I doubt 
the last is necessary; it could just be poor wording in the 
documentation.  I don't know if there's a justification for suppressing 
the excludes.

What happens if you remove the implicit asis that you generate, and 
instead insert explicit asis attributes into the foo1 fileset?  
(Regardless of what the decision is, the test cases need to include all 
combinations of asis, include, exclude, fromdir, relative basedir, 
absolute basedir, and omitted basedir.)

Gary

---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers