[nant-dev] Re: NDoc 1.3

2004-12-19 Thread Jaroslaw Kowalski



I like the wrapper idea. I never understood why 
NAnt included NDoc instead of just spawning it. Same thing applies to 
NUnit.

It would be cool to have a common way of detecting 
the packages locations. I think we can use pkgconfig approach on Unix and 
AssemblyFolders or other registry place on Windows (all we need to do isto 
convince the developers to provide the appropriate registration procedures or 
prepare them ourselves). 

NAnt would then be able to provide a common way to 
get the paths:

package::installed('NUnit2') - 
true/false

package::get-version('NUnit2') - 
2.2.0package::get-lib-path('NUnit2') - "C:\Program Files\NUnit 
2.2\bin"
package::get-exe-path('NUnit2') - "C:\Program 
Files\NUnit 2.2\bin"

Of course, much more needs to be done to properly 
use versioning and framework support but that's the idea.

Jarek

- Original Message - 

  From: 
  Gert 
  Driesen 
  To: 'Jaroslaw Kowalski' 
  Cc: [EMAIL PROTECTED] 
  
  Sent: Sunday, December 19, 2004 1:40 
  PM
  Subject: RE: NDoc 1.3
  
  Hi Jarek,
  
  I'm still in flux on how to proceed with this. Adding all 
  documenters (and their dependencies, which at this time is only the 
  Interop.MSHelpCompiler.dll assembly) to the NAnt distribution would increase 
  the size of the NAnt distribution quite a lot (as we have to include them for 
  each support target framework).
  
  If we do not include all documenters, then we should at 
  least provide more information to our users on how to make the other 
  documenters that available for usage by the ndoc 
  task.
  
  In the end, it would've been better if we 
  couldconvert the ndoc taskto a wrapper for NDocConsole, 
  but then we'd need to have some mechanism on both Windows and Linux to 
  discover the install directory of NDoc.
  
  Gert
  
  
  
  
  From: Jaroslaw 
  Kowalski [mailto:[EMAIL PROTECTED] Sent: zondag 19 december 2004 
  12:34To: Gert DriesenSubject: NDoc 
  1.3
  

Hi Gert!

Will NDoc.Documenter.Xml.dll and other 
documenters be included in NAnt 0.85 ? Currently only NAnt and MSDN 
documenters are available to ndoc task.

Jarek


Re: [nant-dev] NAnt and Gump -- getting closer...

2004-09-07 Thread Jaroslaw Kowalski
I don't know exactly what you're trying to achieve with Gump, but IMO things
are much easier than you think if you fully utilize NAnt's potential.

Nant is quite a portable beast today. It can run on 4 platforms (mono-1.0,
net-1.0, net-1.1, net-2.0) and compile for some more (netcf-1.0 and sscli).
The platform of your choice influences all .NET tasks and involves
platform-specific lookup and commandline parameter pasing. Many things have
been done to assure platform independence so that you can run target
multiple platforms with little to no change in your build scripts. NAnt
provides all the logic to detect the presence and location of
platform-specific assemblies and to pass them as arguments to appropriate
commandline compilers.

On windows it's possible to target all the platforms (including mono for
windows).
On Linux it's only possible to target mono-1.0.

To compile for a particular platform you simply run

nant.exe -targetframework:net-1.0 buildfile.build
nant.exe -targetframework:net-1.1 buildfile.build
nant.exe -targetframework:net-2.0 buildfile.build
nant.exe -targetframework:mono-1.0 buildfile.build
nant.exe -targetframework:netcf-1.0 buildfile.build

If you don't provide the target platform it's assumed that you want to
target the current platform you're running on (.NET 1.1 in most cases, but
can be .NET 2.0 or .NET 1.0).

Nant can be run from any directory, there's no need to invoke it in the
build file directory.
The sequence used to download, compile and install nant from CVS is very
simple:

cvs checkout nant
nant\bin\NAnt.exe install -f:nant\NAnt.build -D:install.prefix=targetprefix

I believe that all steps necessary to fully bootstrap nant from source
(including external dependencies) can be easily put in a single build file
that would be invoked by just-bootstrapped nant itself.

The build would be very simple and would just consist of cvs-checkout,
nant and copy tasks.

Or perhaps I am missing something... Correct me if I'm wrong.

Jarek

BTW. You may contact me on ICQ #298783166 or somewhere on IRC

- Original Message - 
From: Adam R. B. Jack [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
Stefan Bodewig [EMAIL PROTECTED]
Sent: Tuesday, September 07, 2004 6:37 PM
Subject: Re: [nant-dev] NAnt and Gump -- getting closer...



  The script would need to know which framework you intend to use.  For
  the Bourne shell script this simply means something like
 
  #!/bin/sh
  mono bin/NAnt.exe
 
  (ignoring Rotor and DotGNU for now) but the Windows batch file is a
  different beast.

 We could set a Gump parameter in the workspace and launch
 nant-%FRAMEWORK%.[sh|bat] as the script, meaning a different one per
 framework. Alternatively we could pass the framework as a parameter.
 Whichever works best for the NAnt community...

 regards

 Adam



 ---
 This SF.Net email is sponsored by BEA Weblogic Workshop
 FREE Java Enterprise J2EE developer tools!
 Get your free copy of BEA WebLogic Workshop 8.1 today.
 http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Re: NAnt

2004-09-06 Thread Jaroslaw Kowalski

I think that you cannot avoid GAC with .NET because of the order in which
the assebmlies are located:

http://www.awprofessional.com/articles/article.asp?p=30601seqNum=6

The only way would be to remove all non-MS assemblies from it.

I may be wrong, though ;-)

Jarek

- Original Message - 
From: Stefan Bodewig [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 06, 2004 2:18 PM
Subject: [nant-dev] Re: NAnt


 Hi,

 back from vacation so I'm sorry for the delay.

 On Mon, 30 Aug 2004, Gert Driesen [EMAIL PROTECTED] wrote:
  From: Adam R. B. Jack [EMAIL PROTECTED]

  1) Run a script to build NAnt (kinda like the bootstrap-ant.sh
  script)
  2) Use the newly built NAnt to build the rest of Nant-dom (i.e. OSS
  project using NAnt).
 
  There's a makefile in NAnt cvs, but this uses a minimal version of
  NAnt to build a fully functional version.

 I guess this could work for starters, we'd probably want a shell
 script and/or a batch file wrap the make invocation.

  Do you need a target that first creates a bootstrap version, and
  then uses that bootstrap version to build a fully functional version
  ?

 This is more or less how things work for Ant, yes.

  2) How to pass an environemnt (c.f. CLASSPATH for Java folks).

 This is where things become difficult, I'm afraid.  Adam - like me -
 is coming from a Java background and probably - again like me -
 doesn't fully grasp the .NET way of live yet.

 Let me first explain how Gump works for a Java project building with
 Ant.  Let's assume we want to build project A that doesn't have any
 external dependencies, builds with Ant and wants to run JUnit unit
 tests.

 (1) check out Ant from CVS HEAD
 (2) check out JUnit from CVS HEAD
 (3) check out A from CVS HEAD (or SVN trunk or whatever)

 (4) make sure we ignore any version of Ant that may be present on the
 machine.
 (5) bootstrap Ant
 (6) use the bootstrapped version of Ant to build JUnit.
 (7) use the bootstrapped version of Ant plus our fresh build of JUnit
 to build A - make sure that we don't use any other version of
 JUnit that may be installed.

 We achieve the make sure we don't use any other version part by
 controlling the CLASSPATH environment variable (where the Java VM is
 going to look for classes).

 Now replace Ant with NAnt and JUnit with NUnit.  How would something
 like this work?  How could I ever avoid using a version of NUnit
 that's inside the global assembly cache?  How could I specify the
 location of nunit-core.dll at runtime?

 This is what Adam's question really is about - and we Java folks
 probably need more .NET than NAnt help to get started.  This will
 certainly change later 8-)

 Stefan


 ---
 This SF.Net email is sponsored by BEA Weblogic Workshop
 FREE Java Enterprise J2EE developer tools!
 Get your free copy of BEA WebLogic Workshop 8.1 today.
 http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Re: NAnt

2004-09-06 Thread Jaroslaw Kowalski
See this article Avoid DevPath for info on why you should avoid DEVPATH

http://blogs.msdn.com/suzcook/archive/2003/08/15/57238.aspx

I suggest that you do it the simple way - compile the all your
apps/libraries to a single directory using it as both a target and a
reference source and forget the GAC at all. I do it all the time using
simple NAnt scripts and it works fine. Anyway, GAC isn't used during
compilation, so you always know what you're compiling against.

For the testing part, just make sure that the GAC isn't spoiled by any weird
versions of the components you want to run. This can be done with a simple
shell script that uses gacutil to remove unwanted assemblies.

Jarek

- Original Message - 
From: Stefan Bodewig [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, September 06, 2004 5:22 PM
Subject: Re: [nant-dev] Re: NAnt


 On Mon, 6 Sep 2004, Jaroslaw Kowalski [EMAIL PROTECTED] wrote:

  I think that you cannot avoid GAC with .NET because of the order in
  which the assebmlies are located:
 
  http://www.awprofessional.com/articles/article.asp?p=30601seqNum=6

 Thank you for that URL.

 In Gump's case we probably can live with making sure that our version
 is used instead of the one in the GAC and DEVPATH seems to be a way to
 achieve that (I've only read the first paragraph of that article,
 though 8-).

 Does anybody know whether Mono supports DEVPATH?

 Cheers

 Stefan


 ---
 This SF.Net email is sponsored by BEA Weblogic Workshop
 FREE Java Enterprise J2EE developer tools!
 Get your free copy of BEA WebLogic Workshop 8.1 today.
 http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Re: NAnt

2004-09-06 Thread Jaroslaw Kowalski
Hi Clayton!

What's wrong with using the NAnt-provided bootstrap procedure? It uses a
portable mini-nant that is stored in CVS can run on any platform supported.

You just do either:

bin/NAnt.exe

or

mono bin/NAnt.exe

and it will build the entire nant and put it into build/**/bin
If you want to build external dependencies, just compile them and put in the
appropriate bin/lib subdirectory before bootstrapping NAnt.

Jarek
- Original Message - 
From: Clayton Harbour [EMAIL PROTECTED]
To: Adam R. B. Jack [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, September 06, 2004 9:34 PM
Subject: RE: [nant-dev] Re: NAnt


Hi Adam,

I managed to get a first cut at the bootstrap together.  I have only
produced the Windows batch file and just want you to take a look and make
sure it is something you can use before I work on the ?nix script.

There is a batch file attached (extension = .bad so hopefully it won't be
stripped off) that will compile a minimal NAnt and then build itself from
that.  Just some notes on the setup:

COMPILER_EXE: Full path to your compiler (these are defaulted to the
default install locations if not specified).

LIB_REPOSITORY_DIR: Points to a directory with the contents of the bin
directory, namely (these will eventually be built if I understand
correctly):
bin\log4net.dll

bin\lib\net\1.0\NDoc.Core.dll

bin\lib\NUnitCore.dll
bin\lib\net\1.0\nunit.core.dll
bin\lib\net\1.0\nunit.framework.dll
bin\lib\net\1.0\nunit.util.dll

bin\lib\mono\1.0\nunit.core.dll
bin\lib\mono\1.0\nunit.framework.dll
bin\lib\mono\1.0\nunit.util.dll

bin\scvs.exe
bin\lib\ICSharpCode.SharpCvsLib.dll
bin\lib\ICSharpCode.SharpCvsLib.dll

NOTE: scvs.exe is not required to build NAnt

NANT_CVS_DIR: Directory of the fresh NAnt checkout.

There are a couple of other parameters I am playing around with, namely
FRAMEWORK_TYPE and FRAMEWORK_VERSION.  I will probably add these when I can
get mono to compile.  (Almost there, I am getting an exception that makes me
think it is grabbing the System.Web.dll from the ms framework instead of the
mono framework...so I might need to add a full path to that.)

Anyway, please take a look at the scripts and let me know if there are
naming conventions or anything else that should be sync'd up.

Also will the bootstrap sit in the gump repository or should it sit in the
project (i.e. NAnt) repository?


Cheers,


Clayton

-Original Message-
From: Adam R. B. Jack [mailto:[EMAIL PROTECTED]
Sent: Mon 9/6/2004 11:11 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc:
Subject: Re: [nant-dev] Re: NAnt
Stefan wrote:

 In Gump's case we probably can live with making sure that our version
 is used instead of the one in the GAC and DEVPATH seems to be a way to
 achieve that (I've only read the first paragraph of that article,
 though 8-).

Clayton Harbour and I chatted on irc.freenode.net:#asfgump this weekend, and
with Clayton's help we had a simple build of NAnt working (using an
installed NAnt on the %PATH%).

The Gump code ought attempt to generate an assemblies path, and as of a
moment ago attempts to pass it as DEVPATH. I've not entered sufficient
metadata to test this out, but hopefully we can add a log4net or similar to
see soon enough.

BTW: I made three quick tweaks to the Gump metadata. I'll document them once
we settle on them.

1) A project can have an attribute of language=csharp (and this is needed
to generate lib path).

2) The workspace can have dotnet framework=mono-1.0.1 / to set the
framework (passed to NAnt, must be a recently nightly, using -t:).

3) jar (http://gump.apache.org/metadata/project.html#jar) ought be able to
be replaced by output or assembly now.

Theoretically (once we add more metadata) one ought be able to be in the
Gump SVN root and do:

gump.py -w metadata/gump-n.xml log4net  (with or without --debug)

to see things working.

regards,

Adam



---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers







---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Re: NAnt

2004-09-06 Thread Jaroslaw Kowalski
The idea of mini-nant is to have a minimal set of working components that
are able to rebuild nant itself.
It DOES rebuild everything from scratch and is a recommended procedure for
rebuilding NAnt.

The mini-nant is recommended because the nant build process may require some
special tasks (like generating version information and embedding it in the
source files) which are best controlled in the nant script itself (see
create-common-assemblyinfo or documentation-related targets in NAnt.build).
It's very likely that additional tasks will be added to nant bootstrap
process so maintaining them in a NAnt build script looks like a good idea.

BTW. I've been thinging about it for a while and the process of fully
rebuilding NAnt is quite complicated:

1. Download NAnt sources from CVS
2. Bootstrap NAnt using mini-nant and binary libraries found in CVS (bin/lib
directory)
3. From now on, use the bootstrapped NAnt
4. Download and rebuild the platform-neutral version of log4net.dll
5. Download and rebuild the platform-specific version of NUnit.*.dll
6. Download and rebuild the platform-specific version of NDoc.*.dll
7. Download and rebuild the ICSharpCode.SharpCvsLib.Console.dll referencing
the log4net.dll built in step 4
8. Download and rebuild the ICSharpCode.SharpZip.dll
9. Put the just-built DLLs in the appropriate nant/bin/lib subdirectory
11. Bootstrap NAnt again by using the previously built nant (not the
mini-nant) and the fresh libraries

Jarek
- Original Message - 
From: Adam R. B. Jack [EMAIL PROTECTED]
To: Clayton Harbour [EMAIL PROTECTED]; Jaroslaw Kowalski
[EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, September 06, 2004 10:16 PM
Subject: Re: [nant-dev] Re: NAnt


  I was talking with Adam the other day and he suggested that a batch/
shell
 script that built NAnt  from source might be a little better than relying
 on the mini-NAnt.exe.  I believe ant uses
  something similar to bootstrap itself so my understanding is that this
 fits in better with the gump
  philosophy.

 And just for completion ... mainly, I just didn't get what bin/NAnt.exe
was,
 or how it worked. I didn't understand it was for bootstrap. Still,
building
 from scratch each time does fit Gump's philosophy.

 regards

 Adam




---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Member access operator (WAS: Re: [Nant-users] checking nant version)

2004-08-14 Thread Jaroslaw Kowalski
 This is ofcourse the best solution for the issue Jeroen brought up, but
that
 other users might still expect the possibility to use relational
operations
 on versions. Meaning:  should the following functions return a version
data
 type :

 assembly::get-version(string)
 file::get-file-version(string)
 file::get-product-version(string)

 and we could then have the following functions in the version namespace :

 version::get-major(version)
 version::get-minor(version)
 version::get-build(version)
 version::get-revision(version)
 version::to-string(version)
 version::parse(string) or version::from-string(string)

 and support the same operators as supported by the System.Version.

Imagine this extension to NAnt function calls:

assembly::get-version('.dll')::major
assembly::get-version('.dll')::minor
assembly::get-version('.dll')::build
assembly::get-version('.dll')::revision

('.' as a member access operator cannot be used because it can be a part of
a valid identifier)

Same thing would work for functions that return datetime, timespan and other
structures.

datetime::now()::seconds
timespan::whatever()::totalseconds

In the future when we support typed properties, you'd be allowed to do it
even on properties:

property name=zzz type=datetime value=${datetime::now()} /
echo message=${zzz::seconds} /

What do you think?

Jarek



---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink  Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Typed properties

2004-07-20 Thread Jaroslaw Kowalski



Hi guys!

I'd like to propose the introduction of typed 
properties to NAnt. Currently properties are stored as strings which has many 
drawbacks, esp. when used within expressions.
For example:

property name="a" value="false" 
/
if test="${a=false}"
 ...
/if

this test fails because: 
1. "a" is stored as a string
2. equality operator promotes "false" literal to 
string which becomes "False" (note the initial cap - this is what 
Convert.ToString() does) the compares both sides as strings.
3. 'false' != 'False'

My idea is to:

1. Disallow ALL implicit conversions for operators 
- to avoid such confusions
2. Add support for typed properties - to let 
properties store values of types other than strings. It would involve type 
checking on assignment and type-safe retrieval.

The proposed syntax would be:

property name="a" type="bool" value="false" 
/


property name="b" type="int" value="${1+1234}" 
/

When "type" is omitted - "string" is assumed by default for 
compatibility.

The following would fail because of incompatible types:


property name="a" type="bool" value="3" 
/

property name="a" type="int" value="false" 
/

property name="a" type="float" value="zzz" 
/

Assuming we disallow all implicit conversions:


property name="a" type="bool" value="true" 
/

property name="b" type="bool" value="false" 
/

property name="c" type="int" value="123" 
/

property name="d" type="int" value="321" 
/

property name="e" type="string" value="456" 
/

echo message="${a + b}" / -- causes an error,today it 
outputs 'TrueFalse'
echo message="${'aaa' + b}" / --- causes an error, today it outputs 
aaaFalse

echo message="${'aaa' + convert::to-string(b)}" / --- outputs 
aaaFalse

echo message="${c + d}" / -- outputs 444, today it outputs 
123321

echo message="${c + e}" / -- fails, currently it outputs 
123456

echo message="${convert::to-string(c) + e}" / -- outputs 
123456

echo message="${c + convert::to-int(e)}" / -- outputs 579

Implicit conversion would still be applied when passing arguments to 
functions:
Assuming 

int fun(int k) { return k; }

echo message="${fun(e) + 1}}" / -- outputs 457

There are probably more consequences of this idea, if you see any danger - 
let me know.
I'm awaiting your comments. If this idea passes, I'll prepare the 
appropriatepatch. Initial feasibility study shows that it's possible to do 
it without breaking compatibility.


Jarek


Re: [nant-dev] NAnt Namespaces

2004-07-11 Thread Jaroslaw Kowalski
My vote: let's NOT support it - I'd say more - let's disallow it. Simplicity
is an important thing.

The only advantage of XML namespaces I see is technical beauty and XSD
schema support for extensible intellisense - IMHO it's not worth it.

From my experience I can say that it's really difficult to explain the
concept of XML namespaces and URNs to first-time users of XML. Based on
this, I think that using URIs as xml namespaces is the most confusing thing
on the planet (what? there's no file under http://tempuri.org/;) . Most
people are well off without namespaces.

XSDs can be generated usign schema task today, and I think it's good
enough for most cases.

Jarek
- Original Message - 
From: Gert Driesen [EMAIL PROTECTED]
To: Nant-Developers (E-Mail) [EMAIL PROTECTED]
Sent: Sunday, July 11, 2004 11:58 AM
Subject: [nant-dev] NAnt  Namespaces


 Hi,

 Currently the NAnt support for namespaces is very limited, definitely when
 compared to Ant (http://ant.apache.org/manual/CoreTypes/namespace.html).

 Just want to get the discussion on this topic going ...

 Gert



 ---
 This SF.Net email sponsored by Black Hat Briefings  Training.
 Attend Black Hat Briefings  Training, Las Vegas July 24-29 -
 digital self defense, top technical experts, no vendor pitches,
 unmatched networking opportunities. Visit www.blackhat.com
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Mono package references

2004-05-28 Thread Jaroslaw Kowalski
  which would just append the path based on the location of the package.
 This
  would be taken from AssemblyFolders on Windows and pkg-config or mono
  packages on Linux.

 Not sure in what way AssemblyFolder and pkg-config packages are related ?

They both provide a way to specify the location of *.dll files for
compilation. That's all. And we need nothing more.

I don't think that having to know which assemblies you need to reference
for a certain package is such a bad thing. You have to deploy the dlls
anyway so it would be nice if you knew their names.

Jarek



---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] get-assembly-direcotry() function

2004-05-20 Thread Jaroslaw Kowalski
;-) sorry
- Original Message - 
From: Gert Driesen [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]; Giuseppe Greco
[EMAIL PROTECTED]; NAnt Developers
[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 7:30 PM
Subject: Re: [nant-dev] get-assembly-direcotry() function



 - Original Message - 
 From: Jaroslaw Kowalski [EMAIL PROTECTED]
 To: Giuseppe Greco [EMAIL PROTECTED]; NAnt Developers
 [EMAIL PROTECTED]
 Sent: Thursday, May 20, 2004 6:09 PM
 Subject: Re: [nant-dev] get-assembly-direcotry() function


  That's because mono-1.0 stores assemblies in mono/1.0 and they are
  referenced as files from this place.

 Not sure if this is actually an explanation, it should return the full
path
 ...

 Gert



 ---
 This SF.Net email is sponsored by: Oracle 10g
 Get certified on the hottest thing ever to hit the market... Oracle 10g.
 Take an Oracle 10g class now, and we'll give you the exam FREE.
 http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] expression support - null's

2004-05-16 Thread Jaroslaw Kowalski
We can have a null literal and overload comparisons for equality and
inequality:

if test=${property::get-value(...) != null} /

This would make 3 literals: true, false, null

Jarek
- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Gert Driesen [EMAIL PROTECTED]
Cc: Nant-Developers (E-Mail) [EMAIL PROTECTED]
Sent: Sunday, May 16, 2004 8:22 AM
Subject: Re: [nant-dev] expression support - null's


 Gert Driesen wrote:

 Hi Jarek,
 
 Should we add a built-in function to allow for null checks in the NAnt
 expression language ?
 
 eg. if test=${isnull(property::get-value())}
 
 Jarek, what do you think ?
 
 Do we have such a thing as a global namespace (meaning without prefix) ?
 
 
 
 no. I think the current impl needs to always have a namespace- from the
 way the expression parsing works.

 Ian



 ---
 This SF.Net email is sponsored by: SourceForge.net Broadband
 Sign-up now for SourceForge Broadband and get the fastest
 6.0/768 connection for only $19.95/mo for the first 3 months!
 http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: AssemblyFileSet (was Re: [nant-dev] Custom Function to select from ODBC datasource...)

2004-05-13 Thread Jaroslaw Kowalski
+1 for this idea.

Jarek

- Original Message - 
From: Gert Driesen [EMAIL PROTECTED]
To: Ian MacLean [EMAIL PROTECTED]; John Cole [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, May 13, 2004 6:42 PM
Subject: AssemblyFileSet (was Re: [nant-dev] Custom Function to select from
ODBC datasource...)


 Ian,

 Wouldn't this by a good time to consider adding an AssemblyFileSet, and
 centralize that logic ?

 Gert

 - Original Message - 
 From: Ian MacLean [EMAIL PROTECTED]
 To: John Cole [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, May 13, 2004 5:57 PM
 Subject: Re: [nant-dev] Custom Function to select from ODBC datasource...


  Hi John,
  Actually custom functions and tasks are two different things. To start
  writing a custom task you might want to look at this article:
  http://www.theserverside.net/articles/showarticle.tss?id=NAnt
  as well as the sample in the nant sources
  \nant\examples\UserTask\UserTask.cs.
 
  As to why you're getting that error - the script task doesn't currently
  process the asis attribute properly ( its a bug ). I need to migrate
  some logic from the compiler tasks to use the framework resolution stuff
  to resolve system assembly references.
 
  try using the following for now:
 
  includes
  name=C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll /
  and it should work. I get the following on my machine:
 
  Function call
  failed.System.Data.Odbc.OdbcExceptionSystem.Data.Odbc.OdbcException:
  ERROR [IM002] [Microsoft][ODBC Driver Manager]
  Data source name not found and no default driver specified
 at NAnt.Core.ExpressionEvaluator.EvaluateFunction(String
  functionName, Object[] args) in h:\cvs\nant\src\NAnt.Core\ExpressionEv
  aluator.cs:line 91
 at NAnt.Core.ExpressionEvalBase.ParseValue() in
  h:\cvs\nant\src\NAnt.Core\ExpressionEvalBase.cs:line 595
  ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not
  found and no default driver specified
 
 
  Ian
 
  John Cole wrote:
 
  Hello,
First, thanks to everyone who helped get last nights CVS version to
 build,
  I was able to get both NAnt and NAntContrib built this morning.
  
I need to pull some info out of  a MySQL database, and I'd like to
use
  ODBC for this.  The SQL task in NAntContrib will only use oledb
 datasources,
  and the only one I found for MySQL is incomplete and does not work, so
 I'm
  attempting to create my own taks for running an ODBC query.  The task
is
 as
  follows:
  
  ---
   target name=initsql
script language=C# prefix=odbc
 references
   includes name=System.Data.dll asis=true/
 /references
 code![CDATA[
  [Function(query)]
  public static string Query(string pConnStr, string pSQL, string
  pDelimiter)
  {
   string s = ;
   System.Data.Odbc.OdbcConnection c = new
  System.Data.Odbc.OdbcConnection(pConnStr);
   System.Data.Odbc.OdbcCommand cmd = new
  System.Data.Odbc.OdbcCommand(pSQL, c);
   c.Open();
   System.Data.Odbc.OdbcDataReader r;
   r = cmd.ExecuteReader();
  
   while (r.Read())
   {
string line = ;
for(int i = 0; ir.FieldCount; i++)
{
 if (line.Length  0) line += pDelimiter;
 line += r.GetString(i);
}
s += line + \n;
   }
   r.Close();
   c.Close();
  
   return s;
  }
 ]]/code
/script
echo message=${odbc::query('DSN=mantis', 'select id, name, engine
 FROM
  custom_report', ', ')} /
   /target
  ---
  
  This code runs from Visual Stuido, but I get the following error when I
  attempt to run this from within NAnt:
  
  ---
  NAnt 0.85 (Build 0.85.1594.0; net-1.1.win32; nightly; 5/13/2004)
  Copyright (C) 2001-2004 Gerry Shaw
  NAnt Team
  
  Buildfile: file:///C:/Documents file:///C:/Documents  and
  Settings/jcole/My Documents/src/UtilityCenter/default.build
  Target(s) specified: initsql
  
  initsql:
  
  
  BUILD FAILED
  
  C:\Documents and Settings\jcole\My
  Documents\src\UtilityCenter\default.build(357,4):
  Compilation failed:
  c:\Documents and Settings\jcole\Local
Settings\Temp\otnp2wzj.0.cs(21,13)
 :
  error CS0234: The type or namespace name 'Data' does not exist in the
 class
  or namespace 'System' (are you missing an assembly reference?)
  c:\Documents and Settings\jcole\Local
Settings\Temp\otnp2wzj.0.cs(22,13)
 :
  error CS0234: The type or namespace name 'Data' does not exist in the
 class
  or namespace 'System' (are you missing an assembly reference?)
  c:\Documents and Settings\jcole\Local Settings\Temp\otnp2wzj.0.cs(23,6)
:
  error CS0246: The type or namespace name 'c' could not be found (are
you
  missing a using directive or an assembly reference?)
  c:\Documents and Settings\jcole\Local
Settings\Temp\otnp2wzj.0.cs(24,13)
 :
  error CS0234: The type or namespace name 'Data' does not 

Re: [nant-dev] NAnt/Mono

2004-05-11 Thread Jaroslaw Kowalski
Unfortunately I get this:

=
NAnt 0.85 (Build 0.85.1592.0; mono-1.0.unix; nightly; 5/11/2004)
Copyright (C) 2001-2004 Gerry Shaw
NAnt Team

BUILD FAILED

The current runtime framework 'mono-1.0' is not correctly configured in the
NAnt configuration file.
The 'System.dll' assembly does not exist in framework assembly directory
'/opt/mono/lib'.

For more information regarding the cause of the build failure, run the build
again in debug mode.
=

On my system System.dll is in /opt/mono/lib/mono/1.0/.

After I corrected this in the config file I got another error:

  [csc] Compiling 18 files to
'/home/mono/nant/build/mono-1.0.unix/nant-0.85-debug/bin/NAnt.DotNetTasks.dl
l'.

** (/opt/mono/bin/mcs.exe:8665): WARNING **: Could
not find assembly log4net, references from
/home/mono/nant/build/mono-1.0.unix/nant-0.85-debug/bin/NAnt.Core.dll
(assemblyref_index=2)
 Major/Minor: 1,2
 Build:   0,30714
 Token:   (null)


Unhandled Exception: System.NullReferenceException:
A null value was found where an object instance was required.
in (unmanaged)
/opt/mono/lib/libmono.so.0(mono_assembly_open+0xda) [0x8f68d2]
in (unmanaged) /opt/mono/lib/libmono.so.0 [0x8e9e53]
in 0x000d1 Mono.CSharp.Driver:LoadAssembly
(string,bool)
in 0x0009f Mono.CSharp.Driver:LoadReferences ()
in 0x006ac Mono.CSharp.Driver:MainDriver
(string[])
in 0x00012 Mono.CSharp.Driver:Main (string[])

A workaround is to:

$ cp bin/lib/mono/1.0/*.dll build/mono-1.0.unix/nant-0.85-debug/bin/

and re-run make. This fixed all errors.

Gert, make sure you have a clean build of mono. I recommend having a
separate /opt - style prefix for it so that you can easily find old dlls.

Since lib/mono/1.0 is the correct path now that mono has GAC, I've
committed a fix to CVS.

Jarke

- Original Message - 
From: Gert Driesen [EMAIL PROTECTED]
To: Nant-Developers (E-Mail) [EMAIL PROTECTED]
Sent: Tuesday, May 11, 2004 8:31 AM
Subject: [nant-dev] NAnt/Mono


 Hi,

 Just to let you know that NAnt (cvs) should now work on Mono/Linux out of
 the box (without tweaking any config files) :

 $ export CVSROOT=:pserver:[EMAIL PROTECTED]:/cvsroot/nant
 $ cvs -z3 co nant
 $ cd nant
 $ make

 Note: you still might need this workaround for a Mono issue :
 http://nant.sourceforge.net/faq.html#building-mono-1

 Gert



 ---
 This SF.Net email is sponsored by Sleepycat Software
 Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to
deliver
 higher performing products faster, at low TCO.
 http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] NAnt/Mono

2004-05-11 Thread Jaroslaw Kowalski
Yes, I committed a mono patch that fixes the encoding issue. You can try it
from mono/cvs.

Jarek
- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Gert Driesen [EMAIL PROTECTED]
Cc: Jaroslaw Kowalski [EMAIL PROTECTED]; Nant-Developers (E-Mail)
[EMAIL PROTECTED]
Sent: Tuesday, May 11, 2004 5:41 PM
Subject: Re: [nant-dev] NAnt/Mono


 I'm now getting the same error as Jarek - the log4net one. Its weird
 that it only happens when I get to the DotnetTasks assembly. My nant
 sources are definately up to date.

 I have Mono beta 1 installed from the release tarballs. There are no
 system assemblies in $prefix/lib on my system - I made sure I removed
 the old ones before I installed the new release.

 Actually I still get the error on invalid encoding when loading the
 config file. I just remove the encodign attr for now to work around it.
 Maybe thats been fixed since the beta release.

 Ian

 Gert Driesen wrote:

 Jarek,
 
 Did you build Mono from cvs, or did you install a distribution package ?
 
 I always build Mono from cvs, and on my system the system assemblies are
 installed in the GAC and in $prefix/lib, while I also expected these to
be
 installed $prefix/lib/mono/1.0.  I guess I'll have to check what went
wrong
 on my system ...
 
 I definitely do not get the log4net issue on my system, are you sure
you're
 not using an old makefile ?
 
 Gert
 
 - Original Message -
 From: Jaroslaw Kowalski [EMAIL PROTECTED]
 To: Gert Driesen [EMAIL PROTECTED]; Nant-Developers (E-Mail)
 [EMAIL PROTECTED]
 Sent: Tuesday, May 11, 2004 8:51 AM
 Subject: Re: [nant-dev] NAnt/Mono
 
 
 
 
 Unfortunately I get this:
 
 =
 NAnt 0.85 (Build 0.85.1592.0; mono-1.0.unix; nightly; 5/11/2004)
 Copyright (C) 2001-2004 Gerry Shaw
 NAnt Team
 
 BUILD FAILED
 
 The current runtime framework 'mono-1.0' is not correctly configured in
 
 
 the
 
 
 NAnt configuration file.
 The 'System.dll' assembly does not exist in framework assembly
 
 
 directory
 
 
 '/opt/mono/lib'.
 
 For more information regarding the cause of the build failure, run the
 
 
 build
 
 
 again in debug mode.
 =
 
 On my system System.dll is in /opt/mono/lib/mono/1.0/.
 
 After I corrected this in the config file I got another error:
 
   [csc] Compiling 18 files to
 
 
 

'/home/mono/nant/build/mono-1.0.unix/nant-0.85-debug/bin/NAnt.DotNetTasks.d
l
 
 
 l'.
 
 ** (/opt/mono/bin/mcs.exe:8665): WARNING **:
Could
 not find assembly log4net, references from
 /home/mono/nant/build/mono-1.0.unix/nant-0.85-debug/bin/NAnt.Core.dll
 (assemblyref_index=2)
  Major/Minor: 1,2
  Build:   0,30714
  Token:   (null)
 
 
 Unhandled Exception:
 
 
 System.NullReferenceException:
 
 
 A null value was found where an object instance was required.
 in (unmanaged)
 /opt/mono/lib/libmono.so.0(mono_assembly_open+0xda) [0x8f68d2]
 in (unmanaged) /opt/mono/lib/libmono.so.0
 
 
 [0x8e9e53]
 
 
 in 0x000d1 Mono.CSharp.Driver:LoadAssembly
 (string,bool)
 in 0x0009f Mono.CSharp.Driver:LoadReferences
()
 in 0x006ac Mono.CSharp.Driver:MainDriver
 (string[])
 in 0x00012 Mono.CSharp.Driver:Main (string[])
 
 A workaround is to:
 
 $ cp bin/lib/mono/1.0/*.dll build/mono-1.0.unix/nant-0.85-debug/bin/
 
 and re-run make. This fixed all errors.
 
 Gert, make sure you have a clean build of mono. I recommend having a
 separate /opt - style prefix for it so that you can easily find old
dlls.
 
 Since lib/mono/1.0 is the correct path now that mono has GAC, I've
 committed a fix to CVS.
 
 Jarke
 
 - Original Message -
 From: Gert Driesen [EMAIL PROTECTED]
 To: Nant-Developers (E-Mail) [EMAIL PROTECTED]
 Sent: Tuesday, May 11, 2004 8:31 AM
 Subject: [nant-dev] NAnt/Mono
 
 
 
 
 Hi,
 
 Just to let you know that NAnt (cvs) should now work on Mono/Linux out
 
 
 of
 
 
 the box (without tweaking any config files) :
 
 $ export CVSROOT=:pserver:[EMAIL PROTECTED]:/cvsroot/nant
 $ cvs -z3 co nant
 $ cd nant
 $ make
 
 Note: you still might need this workaround for a Mono issue :
 http://nant.sourceforge.net/faq.html#building-mono-1
 
 Gert
 
 
 
 ---
 This SF.Net email is sponsored by Sleepycat Software
 Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to
 
 
 deliver
 
 
 higher performing products faster, at low TCO.
 http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 
 
 
 ---
 This SF.Net email is sponsored by Sleepycat Software
 Learn developer strategies Cisco, Motorola

Re: [nant-dev] Windows setup contribution

2004-03-24 Thread Jaroslaw Kowalski
That's exactly what I'm doing on my Linux box.

I have mono in /opt/mono/{bin,lib}, nant in /opt/nant/{bin,doc} and nant
shell script in /usr/local/bin. The last part is my own idea and I don't
think we should do it in general.

We could have

$ ./configure --prefix=/opt/nant --with-mono=/opt/mono

(this would write the appropriate makefile containing paths: /opt/mono and
/opt/nant + a shell script:

--
#!/bin/sh
export PATH=/opt/mono/bin:$PATH
exec /opt/mono/bin/mono /opt/nant/bin/NAnt.exe $*
---

$ make (this would rebuild nant using the appropriate mono)
# make install (this would copy *.exe, *.dll, *.html + shell script to the
appropriate directories under /opt/nant)

I'm not a unix guru, but this looks like a traditional way of doing Linux
installs today. I wouldn't use autoconf for this purpose. Is it acceptable?

Jarek

- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]
Cc: Nicklas Norling [EMAIL PROTECTED]; Nant-Developers (E-mail)
[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 11:44 AM
Subject: Re: [nant-dev] Windows setup contribution


 Why not just add an install target to nant.build and have the current
 make file call it. So you could just do:

 make install prefix=/usr/local

 actually come to think of it NAnt shouldn't put all its binaries in
 /usr/local/bin or similar as that would break the assembly scanning
 code. It should really put everything in a /nant directory somewhere and
 put a bootstrap shellscript in /usr/local/bin.

 Ian

 1. We should do something about the linux installation really soon. I've
 heard voices that NAnt is very complicated to install on Linux because
you
 cannot do ./configure --prefix=...  make  make install. Maybe a
simple
 configure script that would setup the mono paths in the config file would
 do?
 
 Awaiting your comments.
 
 Jarek
 
 - Original Message - 
 From: Nicklas Norling [EMAIL PROTECTED]
 To: Nant-Developers (E-mail) [EMAIL PROTECTED]
 Sent: Tuesday, March 23, 2004 4:10 PM
 Subject: [nant-dev] Windows setup contribution
 
 
 
 
 Hi all.
 
 I always package up NAnt in a setup for my developers so I thought
 I could as well contribute the iss script file I use in case there are
 
 
 more
 
 
 out there that would like it.
 
 It uses InnoSetup 4.2.0 http://www.jrsoftware.org/isdl.php which is a
 
 
 totaly
 
 
 free and awsome setup tool.
 
 The iss file is designed to be in the root or the release togther with
 the NAnt.sln file. From there is will zipp up .\bin\*.
 
 During install it installs this in a directory, optionally adds a
program
 group and leaves standard uninstall entry in add/remove programs.
 
 It does not currently alter the PATH variable, but I hope to find some
 
 
 free
 
 
 prog that will do that.
 
 The installer file will be called NAntInstaller.exe and will be placed
at
 the root of the release.
 
 I added licence file reference and copyrights as best I could. Hope I
got
 
 
 it
 
 
 right.
 
 /Nicke
 
 
 
 
 
 
 
 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials
 Free Linux tutorial presented by Daniel Robbins, President and CEO of
 GenToo technologies. Learn everything from fundamentals to system
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 


 -- 
 Ian MacLean, Developer,
 ActiveState, a division of Sophos
 http://www.ActiveState.com




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Windows setup contribution

2004-03-23 Thread Jaroslaw Kowalski
Very nice installer!

I have some ideas for 1.0 release and I wonder if they can all be
implemented with this tool:

1. Binaries should go to Program Files\NAnt\bin and should include *.exe,
*.dll but no *.xml (at least not by default)

2. I wonder if we could get rid of the *.pdb since they occupy about 50% of
all space used.

3. We should include the documentation. I think that doc/help/**/* is
enough. The docs should be either plain *.html or *.chm compressed files
(which I personally prefer). PDF would be nice as an option, too because
it's easy to print as a reference.

4. We should also include the SDK docs as an option.

5. We should register ourselves in the registry in some versioning-aware
manner so that various tools (like NAntMenu or editor integrations) can
locate NAnt executables or config file.

6. I think that the final executable of the installer should be below 1 MB
in size. Having a huge build tool scares many people. If needed, we could
make some parts not usually needed (like the SDK docs, PDB symbols, source
code) available as separate downloads.

7. Should we register Nant SDK components in AssemblyFolders so that they
are easily referenceable in VS.NET ? Unfortunately this would clash with
log4net.dll, NUnit.Framework.dll and other components that also register
themselves this way.

8. We should somehow detect alternative CLIs (Mono, Rotor, .NETCF, DotGNU)
and modify NAnt.config file accordingly to make NAnt find them. Should they
be installed in some non-standard place, we'd allow the user to browse for
the appropriate paths.

9. Should we include some GUI (shell integration, VS.NET integration) in the
1.0 release?

Offtopic:

1. We should do something about the linux installation really soon. I've
heard voices that NAnt is very complicated to install on Linux because you
cannot do ./configure --prefix=...  make  make install. Maybe a simple
configure script that would setup the mono paths in the config file would
do?

Awaiting your comments.

Jarek

- Original Message - 
From: Nicklas Norling [EMAIL PROTECTED]
To: Nant-Developers (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 4:10 PM
Subject: [nant-dev] Windows setup contribution


 Hi all.

 I always package up NAnt in a setup for my developers so I thought
 I could as well contribute the iss script file I use in case there are
more
 out there that would like it.

 It uses InnoSetup 4.2.0 http://www.jrsoftware.org/isdl.php which is a
totaly
 free and awsome setup tool.

 The iss file is designed to be in the root or the release togther with
 the NAnt.sln file. From there is will zipp up .\bin\*.

 During install it installs this in a directory, optionally adds a program
 group and leaves standard uninstall entry in add/remove programs.

 It does not currently alter the PATH variable, but I hope to find some
free
 prog that will do that.

 The installer file will be called NAntInstaller.exe and will be placed at
 the root of the release.

 I added licence file reference and copyrights as best I could. Hope I got
it
 right.

 /Nicke





---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Bug report

2004-03-20 Thread Jaroslaw Kowalski
Can you try the latest nightly build? Many, many solution bugs were fixed
since then.

Jarek
- Original Message - 
From: Greg Arzoomanian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 5:34 PM
Subject: [nant-dev] Bug report





 I'm receiving the following message when running Nant.  As per the
message,
 I'm sending it.  The build file is attached.

 Greg Arzoomanian
 TailWind Solutions, Inc.
 http://tailwindinc.com

 **

 C:\ga\proj\TailWind\Source\FS3\FieldSpace3c:\import\nant\bin\nant
  SolutionBuild

 NAnt 0.84 (Build 0.84.1455.0; net-1.0.win32; release; 12/26/2003)
 Copyright (C) 2001-2003 Gerry Shaw
 http://nant.sourceforge.net

  Buildfile:
  file:///C:/ga/proj/TailWind/Source/FS3/FieldSpace3/FieldSpace3.build
  Target(s) specified: SolutionBuild

  SolutionBuild:

   [solution] Starting solution build.
   [solution] Only C#, VB.NET and C++ projects are supported.  Skipping
  project '..\DebugInstaller\DebugInstaller.vdproj'.
   [solution] Only C#, VB.NET and C++ projects are supported.  Skipping
  project '..\ReleaseInstaller\ReleaseInstaller.vdproj'.
   [solution] Only C#, VB.NET and C++ projects are supported.  Skipping
  project '..\FS21UIInstaller\FS21UIInstaller.vdproj'.

  BUILD FAILED

  INTERNAL ERROR

  System.ArgumentNullException: Value cannot be null.
  Parameter name: path2
 at System.IO.Path.Combine(String path1, String path2)
 at NAnt.VSNet.VcConfiguration.get_OutputPath()
 at NAnt.VSNet.VcProject.GetOutputPath(String configuration)
 at NAnt.VSNet.Solution.GetDependenciesFromProjects()
 at NAnt.VSNet.Solution..ctor(String solutionFileName, ArrayList
  additionalProjects, ArrayList referenceProjects, TempFileCollection tfc,
  SolutionTask solutionTask, WebMapCollection webMappings, FileSet
  excludesProjects, String outputDir

 at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask()
 at NAnt.Core.Task.Execute()
 at NAnt.Core.Target.Execute()
 at NAnt.Core.Project.Execute(String targetName, Boolean
  forceDependencies)
 at NAnt.Core.Project.Execute()
 at NAnt.Core.Project.Run()

  Please send bug report to [EMAIL PROTECTED]

  Total time: 0.5 seconds.




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] New to the list

2004-03-19 Thread Jaroslaw Kowalski
);
 project.Properties[prop_name] = prop_val;
 }
 }
 }
 }
 catch (Exception exc) {
 throw new BuildException(Exception caught while
 loading properties file:\n + exc.Message);
 }
 }
 ]]/code
 /script

 This is also a bit of functionality that I'd like to add to Nant.  This
 code doesn't verify the property file at all, it just finds lines that
look
 like properties and ignores the rest.  Also, there's this line:

 prop_val = project.Properties.ExpandProperties(prop_val,
 Location.UnknownLocation);

 This line seems troublesome to me because if something later changes one
of
 those properties, the dependent properties will not change.  I did try to
 mark the properties as dynamic through the PropertyDictionary, but Nant
 comes back with an error explaining that MarkDynamic is not defined.  Any
 suggestions on how to fix this?  And how much validation would be required
 for a properties file in order to add the same properties file
capabilities
 that Ant has to Nant?

 Thanks for your time,

 Dustin



 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials
 Free Linux tutorial presented by Daniel Robbins, President and CEO of
 GenToo technologies. Learn everything from fundamentals to system
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers

// NAnt - A .NET build tool
// Copyright (C) 2001-2003 Gerry Shaw
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
// Ian Maclean ([EMAIL PROTECTED])
// Jaroslaw Kowalski ([EMAIL PROTECTED])

using System;
using System.IO;
using System.Text;
using System.Collections;
using System.Reflection;
using System.Globalization;

using NAnt.Core;
using NAnt.Core.Types;
using NAnt.Core.Attributes;

namespace NAnt.Core.Functions {
[FunctionSet(fileset, Fileset)]
public class FilesetFunctions : FunctionSetBase {
#region Public Instance Constructors

public FilesetFunctions(Project project, PropertyDictionary propDict) : 
base(project, propDict) {
}

#endregion Public Instance Constructors

#region Public Instance Methods

[Function(exists)]
public bool Exists(string filesetId) {
DataTypeBase dtb = Project.DataTypeReferences[filesetId];
if (dtb == null)
return false;
if (dtb is FileSet)
return true;
else
return false;
}

[Function(get-file-count)]
public int GetFileCount(string filesetId) {
FileSet fs = GetFileSetByID(filesetId);
return fs.FileNames.Count;
}

[Function(get-file-name)]
public string GetFileCount(string filesetId, int pos) {
FileSet fs = GetFileSetByID(filesetId);
return fs.FileNames[pos];
}

[Function(is-empty)]
public bool IsEmpty(string filesetId) {
FileSet fs = GetFileSetByID(filesetId);
return fs.FileNames.Count == 0;
}

[Function(flatten)]
public string Flatten(string filesetId, string separator) {
FileSet fs = GetFileSetByID(filesetId);
StringBuilder result = new StringBuilder();

foreach (string s in fs.FileNames) {
if (result.Length != 0)
result.Append(separator);

result.Append(s);
}

return result.ToString();
}

private FileSet GetFileSetByID(string id)
{
DataTypeBase dtb = Project.DataTypeReferences[id];
if (dtb == null)
throw new 
ArgumentException(String.Format(CultureInfo.InvariantCulture, Fileset: '{0}' not 
found, id));
if (!(dtb is FileSet))
throw new 
ArgumentException(String.Format(CultureInfo.InvariantCulture, Fileset: '{0}' not 
found, id));
return (FileSet)dtb;
}

#endregion Public Instance Methods
}
}


Re: [nant-dev] New to the list

2004-03-19 Thread Jaroslaw Kowalski
OK. I'd like to gather current ideas (with some minor modifications) with
one-line summaries:

fileset::exists(id) - checks whether fileset named id is defined in
current project
fileset::get-file-count(id) - returns the number of files matched by the
fileset id
fileset::is-empty(id) - checks whether fileset named id matches zero files
(a shortcut function - same thing can be achieved by
fileset::get-file-count(id)=0)
fileset::get-file-name(id,n) - returns the n-th file from the fileset
(according to some ordering)
fileset::to-string(id,separator) - returns a list of files from the fileset
'id' separated by 'separator'
fileset::contains(id,filename) - checks whether the fileset 'id' contains
file 'filename'

Any corrections or new ideas ?

Jarek

- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Horsfield, Peter A [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 19, 2004 5:57 PM
Subject: Re: [nant-dev] New to the list


 how about:
 to-string() or to-delimited-string() which is a bit of a mouthful ?

 oh and why not fileset::count() instead of or as well as
 fileset::is-empty() ?

 Ian

 Horsfield, Peter A wrote:

 Please don't call it flatten.
 
 That's already used in the context of taking files from subdirectories
 and placing them in one single directory.
 
 On the other hand the ability to arbitrarily take a list of items and
create
 a
 single delimited array would be useful to me. I already have C# embedded
 scripts that do this for arrays of properties.
 
 This concatenation could be done for any Collection that could be
 enumerated.
 Is this the case for filesets?
 
 Two cents,
 
 Peter
 
 -Original Message-
 From: Jaroslaw Kowalski [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 10:24 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [nant-dev] New to the list
 
 
 I'd like to propose a new function set that would help solve the issue of
 generating a classpath from a list of files. The functions deal with
named
 filesets like this:
 
 project
 fileset id=zzz
 includes name=*.cs /
 /fileset
 fileset id=rrr
 includes name=*.csu7987987 /
 /fileset
 echo message=flatten: ${fileset::flatten('zzz',';')} /
 echo message=exists: ${fileset::exists('zzz')} /
 echo message=exists: ${fileset::exists('zzz2')} /
 echo message=is-empty: ${fileset::is-empty('zzz')} /
 echo message=is-empty: ${fileset::is-empty('rrr')} /
 echo message=file-count: ${fileset::get-file-count('zzz')} /
 echo message=file-name[0]: ${fileset::get-file-name('zzz',0)} /
 /project
 
 Proposed implementation is attached (no help yet, but if we decide this
 should go in, I'll write some help text).
 
 With this you'd be able to do:
 
 fileset id=jarfiles
 includes name=${ant.home}/lib/*.jar /
 /fileset
 
 exec commandline ...-classpath ${fileset::flatten('jarfiles',';')}...

 /
 
 I believe that this technique would be useful in many more places. Should
I
 commit?
 
 Jarek
 
 - Original Message - 
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 2:57 PM
 Subject: [nant-dev] New to the list
 
 
 
 
 
 
 Hi everyone!  I joined this list because there are some differences
 
 
 between
 
 
 Nant and Ant which have been causing me trouble.  I wanted to post my
 solutions in the hopes that they may be useful.  If it's stuff that's
 already been thought of, just tell me to shut up :)
 
 The first problem I ran up against was running Ant from Nant.  On the
 Windows platform, Ant is run through a batch file which does not
 communicate the program exit code.  So the Nant build always believes
 that the Ant build succeeded.  To get around this, I actually call the
 Java class file like so:
 
 exec
 program=${java.home}/bin/java.exe
 workingdir=${mbpa.home}
 commandline=-classpath ${ant.cp}
 org.apache.tools.ant.launch.Launcher build
 failonerror=true
 /
 
 This is obviously not a problem, however getting the classpath correct
 is
 
 
 a
 
 
 pain because you have to add all the jars in the ant/lib directory
 since Nant doesn't have any clue what a Java classpath is.  To achieve
 this, I wrote a little script:
 
 script language=C#
 code![CDATA[
 public static void ScriptMain( Project project ) {
 string ald = project.Properties[ant.home] +
/lib;
 string jh = project.Properties[java.home];
 string cp = jh + /lib/tools.jar;
 DirectoryInfo di = new DirectoryInfo(ald);
 FileInfo[] files = di.GetFiles(*.jar);
 foreach (FileInfo fi in files)
 cp += ; + ald + / + fi.Name;
 project.Properties[ant.cp] = cp;
 }
 ]]/code
 /script
 
 It's a simple script and it has been working very well for me

Re: [nant-dev] Re: [MonoDevelop] #D coorporation

2004-03-19 Thread Jaroslaw Kowalski
  3. does nant support building C?

 Just ask it to the NAnt community: Ian, Gert, Jarek, is there any
 plan to build C support in NAnt?

I don't think it's a good idea for NAnt to directly support C compilation or
even C compiler invocation, just because it's s complex (just look at
the size of typical configure generated by autoconf). NAnt is about
portability.

some-wild-ideas

I think we actually could support the auto* tools instead.

Considering that most C packages today have a pretty standard installation
routines:

./configure --prefix=...  make  make install

NAnt could support it by:

- locating locating and running make executable for you (this is non-trivial
on win32, on Unix you have some options too...). Same thing applies to other
gnu utilities and even /bin/sh.
- setting the appropriate standard environment variables (like CC, CFLAGS,
etc.)
- filtering the build output messages (for example to show only errors and
warnings)
- perhaps we could also support some standard ways of specifying where
components are located (like PKGCONFIG_PATH), e.g. by detecting host OS
type.
- I'm also thinking about automating software tarballs downloads and
extraction (not very sophisticated, we don't want to have another Gentoo or
BSD ports implemented in .NET)

In general, I think NAnt should support running auto*tools instead of
replacing them.

/some-wild-ideas

Awaiting your opinions.

Jarek



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Remove support for WebDAV from solution task ?

2004-03-08 Thread Jaroslaw Kowalski
Perhaps we could have a webdav-copy task instead that would be similar to
copy but accept WebDAV sources/targets.

+1 for the idea of removing WebDAV from the solution task.

Jarek
- Original Message - 
From: Erick Thompson [EMAIL PROTECTED]
To: Gert Driesen [EMAIL PROTECTED]; NAnt Users Mailing List
[EMAIL PROTECTED]; Nant-Developers (E-Mail)
[EMAIL PROTECTED]
Sent: Monday, March 08, 2004 11:47 PM
Subject: RE: [nant-dev] Remove support for WebDAV from solution task ?


 I haven't used WebDAV, but if I could use it to distribute a website to a
final server, it would be very very useful to me. At the moment, I have a
manual FTP step is required to move a web project to the production server.

 Erick

  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] Behalf Of Gert
  Driesen
  Sent: Monday, March 08, 2004 2:36 PM
  To: NAnt Users Mailing List; Nant-Developers (E-Mail)
  Subject: [nant-dev] Remove support for WebDAV from solution task ?
 
 
  Hi,
 
  I'm just asking to get an idea of how many people actually
  use it, but how
  would you feel if we would remove WebDAV support from the
  solution task ?
 
  We've noticed that lots of people have problems configuring
  their webserver,
  in order to get the solution task working, so it might be
  better to remove
  support for WebDAV altogether.  This would also allow us to
  simplify some of
  the code, and make the code easier to maintain.
 
  What do you think ?
 
  Gert
 
 
 
  ---
  This SF.Net email is sponsored by: IBM Linux Tutorials
  Free Linux tutorial presented by Daniel Robbins, President and CEO of
  GenToo technologies. Learn everything from fundamentals to system
  administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
  ___
  nant-developers mailing list
  [EMAIL PROTECTED]
  https://lists.sourceforge.net/lists/listinfo/nant-developers
 


 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials
 Free Linux tutorial presented by Daniel Robbins, President and CEO of
 GenToo technologies. Learn everything from fundamentals to system
 administration.http://ads.osdn.com/?ad_id70alloc_id638opÃŒk
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Bug #908317 - Project with no source files builds with an error

2004-03-07 Thread Jaroslaw Kowalski
Hi Alex!

Just out of curiosity: I remember MSBuild used to have a syntax where you
had to use Task name=... ... / to run tasks.
In your example I see MakeDir, Touch, Delete

What version of the syntax are you going to support in Whidbey?

Jarek

- Original Message - 
From: Alex Kipman [EMAIL PROTECTED]
To: Gert Driesen [EMAIL PROTECTED]; Keyser, Jeffrey
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: MSBuild External Feedback [EMAIL PROTECTED]
Sent: Monday, March 08, 2004 5:46 AM
Subject: RE: [nant-dev] Bug #908317 - Project with no source files builds
with an error


 As I told you offline : right now, its not possible to create assemblies
 containing no source files at all using the commandline compilers.
 HJowever, I'm pretty sure MS will have to revise this if they intend
 want to
 use MSBuild as build engine in VS.NET Whidbey.

 We can't just have the solution task skip the project if there are no
 sources in the project, as there could, for example, be resources in the
 project.
  Hi Gert/Jeffrey,

 Turns out we run into the same issue with MSBuild.  The compilers have
 very good reasons for erroring in this case, so they will not be
 changing in the Whidbey timeframe.  We have gotten around this problem
 in our targets files.  I've pasted the steps below.  This ports pretty
 1:1 to NAnt so you should be able to do the same to get around this
 problem.

 Basically we create an empty file which we then feed to the compilers.
 We use our touch task to do this for us.  We then clean this file.

 In the beta of Whidbey if you look in our Framework.targets you'll find
 the following target:

 !--
  Prepare the prerequisites for building.
 --
 Target
   Name=PrepareForBuild
   DependsOnTargets=$(PrepareForBuildDependsOn)
 
   !--
 Create the directories for intermediate and final build products.
   --
   MakeDir
  Directories=$(OutDir);$(IntermediateOutputPath);
   @(DocFileItem-'%(RelativeDir)')/
   !--
 We support building libraries even when there are no source files.
 If no source file is specified in the project file, then we generate
 an empty one here with an extension of
 $(DefaultLanguageSourceExtension).
   --
   Touch
  Condition='@(Compile)'==''
  AlwaysCreate=true
  Files=$(IntermediateOutputPath)VisualStudio.Empty
 $(DefaultLanguageSourceExtension)
  Output TaskParameter=TouchedFiles ItemName=Compile
  Condition= '$(BuildingInsideVisualStudio)' != 'true' /
   /Touch
 /Target

 !--
  Delete the empty source file if one was created at the start of the
 build.
 --
 Target
   Name=RemoveEmptyGeneratedSource
   Condition=Exists('$(IntermediateOutputPath)VisualStudio.Empty
  $(DefaultLanguageSourceExtension)')
   DependsOnTargets=$(RemoveEmptyGeneratedSourceDependsOn)
 
 Delete Files=$(IntermediateOutputPath)VisualStudio.Empty
$(DefaultLanguageSourceExtension)/
 /Target

 Let me know if you have any other questions,

 Alex Kipman ([EMAIL PROTECTED])
 Program Manager
 MSBuild Team



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] CVS vs. SVN

2004-03-06 Thread Jaroslaw Kowalski
Good point. I've just comitted a two-line patch that adds

Excludes.Add(**/.svn);
Excludes.Add(**/.svn/**);

Jarek

BTW. Subversion rocks!!! I've been using it since 0.37 and it works great.
No more directory versioning/file rename problems,

- Original Message - 
From: Giuseppe Greco [EMAIL PROTECTED]
To: NAnt Developers [EMAIL PROTECTED]
Sent: Saturday, March 06, 2004 11:20 AM
Subject: [nant-dev] CVS vs. SVN


 Hi all,

 What's about SVN? NAnt just supports CVS,
 but CVS is leaving the game, and the
 migration process to SVN has already
 started...

 We are also porting all our projects to
 SVN.

 Another point related to CVS/SVN: I think
 NAnt should skip the CVS/.svn directories.
 Actually, one has to manually exclude them
 from the current fileset.

 j3d.
 -- 
 
 Giuseppe Greco

 ::agamura::

 phone:  +41 91 604 67 65
 mobile: +41 76 390 60 32
 email:  [EMAIL PROTECTED]
 web:www.agamura.com
 



 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials
 Free Linux tutorial presented by Daniel Robbins, President and CEO of
 GenToo technologies. Learn everything from fundamentals to system
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] CVS vs. SVN

2004-03-06 Thread Jaroslaw Kowalski
 Ian, Gert, and Jarek, don't you think that the
 svn task should be placed in the NAnt core?

If it's stable enough (I don't see why it would be 'unstable' - it's just a
wrapper), +1 to this idea.

Jarek



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Building NAnt on Mono

2004-03-04 Thread Jaroslaw Kowalski
This is related to a bug in mono. I've reported it as a bug in ximian
bugzilla.

http://bugzilla.ximian.com/show_bug.cgi?id=54980

Note that NUnit is not working either.

I hacked mcs with this patch:

---
Index: System/AppDomain.cs
===
RCS file: /mono/mcs/class/corlib/System/AppDomain.cs,v
retrieving revision 1.55
diff -u -r1.55 AppDomain.cs
--- System/AppDomain.cs 10 Feb 2004 11:04:03 -  1.55
+++ System/AppDomain.cs 4 Mar 2004 20:12:04 -
@@ -723,7 +723,8 @@
if (domain == null)
throw new ArgumentNullException (domain);

-   InternalUnload (domain.getDomainID());
+   // HACK - this causes a lot of trouble
+   // InternalUnload (domain.getDomainID());
}

[MethodImplAttribute(MethodImplOptions.InternalCall)]

Jarek

- Original Message - 
From: Giuseppe Greco [EMAIL PROTECTED]
To: NAnt Developers [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 7:53 PM
Subject: [nant-dev] Building NAnt on Mono


 Hi all,

 I've just checked out the latest version of NAnt
 from CVS, and I'm not able to build it on Linux.

 Here's the error message:


 create-common-assemblyinfo:

[attrib] Setting file attributes for 1 files to Normal.

 ** (bin/NAnt.exe:32596): WARNING **: Aborting of threads in domain
 TypeGatheringDomain timed out.

 BUILD FAILED

 /home/genius/projects/nant/NAnt.build(49,9):
 AssemblyInfo file '/home/genius/projects/nant/src/CommonAssemblyInfo.cs'
 could not be generated.
 Aborting of threads in domain TypeGatheringDomain timed out.

 Has anybody experienced the same problem?
 I'm running the very last version of Mono form CVS.

 Thanks,
 j3d.

 -- 
 
 Giuseppe Greco

 ::agamura::

 phone:  +41 91 604 67 65
 mobile: +41 76 390 60 32
 email:  [EMAIL PROTECTED]
 web:www.agamura.com
 



 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials
 Free Linux tutorial presented by Daniel Robbins, President and CEO of
 GenToo technologies. Learn everything from fundamentals to system
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] rxd the following error

2004-03-02 Thread Jaroslaw Kowalski
If it happens on Unix - add mcs/csc to your PATH.
On Windows - you need to have .NET 1.0 installed in order for solution to
work. This will be sorted out in the future.

Jarek
- Original Message - 
From: Ladva, Hitesh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 6:17 PM
Subject: [nant-dev] rxd the following error


System.ComponentModel.Win32Exception: The system cannot find the file
specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo
startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at NAnt.VSNet.Project.Compile(String configuration, ArrayList
alCSCArguments, String strLogFile, Boolean bVerbose, Boolean bShowCommands)
   at NAnt.VSNet.Solution.Compile(String configuration, ArrayList
compilerArguments, String logFile, Boolean verbose, Boolean showCommands)
   at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName, Boolean
forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()

Please send bug report to [EMAIL PROTECTED]



***
GMAC-RFC Limited (Company registered in England with No.3489004)
whose registered office is at Eastern Gate, Brants Bridge, Bracknell,
Berkshire,
England, RG12 9BZ.
Telephone: (01344) 478478, Fax: (01344) 478050.

PRIVACY AND CONFIDENTIALITY NOTICE
Information contained in this email and any attachments is confidential
and is intended for the use of the addressee only.  If you are not the
intended recipient please notify us immediately.  Any dissemination,
distribution, copying or use of this information without our prior consent
is strictly prohibited.

VIRUS WARNING
The contents of any attachment to this email may contain software viruses
which could damage your own computer system.  While GMAC-RFC has taken
reasonable precautions to minimise this risk, it cannot
accept liability for any damage which you suffer as a result of software
viruses.  You should carry out your own virus checks before opening any
attachment.

***




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


PATCH: file::exists() wildcard support, WAS: Re: [nant-dev] 2 small changes to consider

2004-02-27 Thread Jaroslaw Kowalski
This patch adds wildcard support to file::exists(). Basically it uses
DirectoryScanner to find matching files.

Is it ok to commit it ?

Jarek


fileexists.patch
Description: Binary data


Re: PATCH: file::exists() wildcard support, WAS: Re: [nant-dev] 2 small changes to consider

2004-02-27 Thread Jaroslaw Kowalski
Speed? Of course it's possible to always use the scanner and I can change
it.

Jarek
- Original Message - 
From: Scott Hernandez [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]; Hemry, Jeff
[EMAIL PROTECTED]
Cc: ! nant [EMAIL PROTECTED]
Sent: Friday, February 27, 2004 8:27 PM
Subject: Re: PATCH: file::exists() wildcard support, WAS: Re: [nant-dev] 2
small changes to consider



 Is there any reason that you don't always use the scanner?

 if (file.IndexOf(*) != -1 || file.IndexOf(?) != -1) {
 ...
 } else
 return File.Exists(Project.GetFullPath(file));

 Less code paths, etc... :)

 - Original Message - 
 From: Jaroslaw Kowalski [EMAIL PROTECTED]
 To: Hemry, Jeff [EMAIL PROTECTED]; ! nant
 [EMAIL PROTECTED]
 Sent: Friday, February 27, 2004 11:13 AM
 Subject: PATCH: file::exists() wildcard support, WAS: Re: [nant-dev] 2
small
 changes to consider


  This patch adds wildcard support to file::exists(). Basically it uses
  DirectoryScanner to find matching files.
 
  Is it ok to commit it ?
 
  Jarek
 




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: PATCH: file::exists() wildcard support, WAS: Re: [nant-dev] 2 small changes to consider

2004-02-27 Thread Jaroslaw Kowalski
 Yeah, I'm sure we all go back and forward on this issue. Performance is
 important, and we should strive towards it, but I have found that
sometimes
 what seems like a performance tweak turns out to not work out as I expect.
 I'm sure the scanner is slower than file.exists, but in this case I would
 lean towards less code paths, and leave the performance issues till we
start
 to see a problem. Profiling nant will most likely result in all kinds of
hot
 spots. If this is an issue, changing it will be important. It may even be
 that we tune the scanner to check for the special case of a file without
any
 wildcards, then the overhead is just a few objects and a virtual method
 calls, as compared to just the file.exists call. I'm sure the slowest part
 of all this, by far, is the io operation to check for the file.

 This is really more of a general question as to whether we should code for
 less code paths (simpler code?) or try to write with performance in mind.
 I'm leaning towards less code paths... :)

It's fine with me, really ;-)

Jarek



---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] 2 small changes to consider

2004-02-26 Thread Jaroslaw Kowalski
  2) Availabletask: modified to allow for wildcards, such that it would be
  acceptable to determine if c:\temp\*.txt is available.
 
 I guess you could accomplish this using the foreach task, perhaps not a
 pretty way to do it, but possible ...
 
 We are actually thinking about deprecating the available task as all of
 its functionality is now also available using expressions/functions ...

Or we can extend file::exists() to accept wildcards...

Jarek



---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] PATCH: DateTime and TimeSpan literals

2004-02-22 Thread Jaroslaw Kowalski
Hi!

I've prepared a nant patch that adds support for datetime and timespan
literals in expressions.

This is a first step towards improving implicit vs explicit conversions
issue. Today, the only way to specify a date literal is to use:
convert::to-datetime(MM/DD/) which is not very elegant.

I propose a patch that adds:

- datetime literals (enclosed in square brackets)

[-MM-DD]
[-MM-DD HH:MI]
[-MM-DD HH:MI:SS]
[-MM-DD HH:MI:SS.MIL]

- timestamp literals (enclosed in square brackets, too)

[HH:MI:SS.MIL]
[HH:MI:SS]
[DD:HH:MI:SS.MIL]
[DD:HH:MI:SS]

Additionally it changes SafeConvert to manually produce the
datetime/timestamp according to the mentioned format. This is used in
PropertyDictionary.Expand*() to ensure that all datetime strings are
produced in -MM-DD [HH:MI:SS[.MIL]] format.

Now, instead of:

convert::to-datetime('01-01-2000') + convert::to-timespan('01:01:01')

you can write:

[2000-01-01] + [01:01:01]

which is definitely more readable and typesafe.

What do you think? May I commit it?

Jarek


dateliterals.patch
Description: Binary data


Re: [nant-dev] Implicit conversions in expressions

2004-02-22 Thread Jaroslaw Kowalski
 We (I added this recently) currently also allow an implicit conversion of
 null to a (empty) string, which is useful for functions that return
 reference types (eg. framework::get-runtime-engine()).  Should we keep
this,
 or do you want to add a is-null() function (in what namespace) and a
 conversion function from null to (empty) string ?

the idea is ok, but should add more checks for null. Like here:

switch (op) {
case ExpressionTokenizer.TokenType.EQ:
return o.Equals(o2);

case ExpressionTokenizer.TokenType.NE:
return !o.Equals(o2);
...
}

 That reminds me : we need to document the return type of functions too in
 the generated docs ...

yes. the function docs are lagging a bit.

Is there anybody on the list who can take a task of improving the docs?
Basically we need to add more C# documentation-style comments to functions
in NAnt.Core/Functions/*.cs.

Jarek



---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] PATCH: DateTime and TimeSpan literals

2004-02-22 Thread Jaroslaw Kowalski
 Hi Jarek,

 I agree that this looks more readable, but I'm not sure its good to add
 another way to create datetime or timespan instances.  We'll need to
retain
 the convert::to-datetime/timespan anyway ...

convert::to-datetime is here to stay (for example to convert a value
retrieved from a property), but they are more formal right now - they only
accept one of the mentioned formats, nothing else.

 We should also stick to using the .NET framework conversion routines to
 handle conversion to and from datetime/timespan.  Maybe one day we'll
allow
 users to define the culture in which they want to run NAnt ...

The conversion routines in .NET aren't as strict as possible (vide
boolean=double) and looks like MS does them differently than mono in some
cases. We could either file one mono bug after another or just implement our
own conversion functions.

That's what my patch does.

Do you really want to allow the cultures to be specified? Why? This kills
portability IMHO.

 Again, I agree that this is not very readably, but I think this is a
problem
 with the expression support as such ...

;-( What can we do to improve it?

Jarek

 - Original Message - 
 From: Jaroslaw Kowalski [EMAIL PROTECTED]
 To: ! nant [EMAIL PROTECTED]
 Sent: Sunday, February 22, 2004 11:51 PM
 Subject: [nant-dev] PATCH: DateTime and TimeSpan literals


  Hi!
 
  I've prepared a nant patch that adds support for datetime and timespan
  literals in expressions.
 
  This is a first step towards improving implicit vs explicit conversions
  issue. Today, the only way to specify a date literal is to use:
  convert::to-datetime(MM/DD/) which is not very elegant.
 
  I propose a patch that adds:
 
  - datetime literals (enclosed in square brackets)
 
  [-MM-DD]
  [-MM-DD HH:MI]
  [-MM-DD HH:MI:SS]
  [-MM-DD HH:MI:SS.MIL]
 
  - timestamp literals (enclosed in square brackets, too)
 
  [HH:MI:SS.MIL]
  [HH:MI:SS]
  [DD:HH:MI:SS.MIL]
  [DD:HH:MI:SS]
 
  Additionally it changes SafeConvert to manually produce the
  datetime/timestamp according to the mentioned format. This is used in
  PropertyDictionary.Expand*() to ensure that all datetime strings are
  produced in -MM-DD [HH:MI:SS[.MIL]] format.
 
  Now, instead of:
 
  convert::to-datetime('01-01-2000') + convert::to-timespan('01:01:01')
 
  you can write:
 
  [2000-01-01] + [01:01:01]
 
  which is definitely more readable and typesafe.
 
  What do you think? May I commit it?
 
  Jarek
 



 ---
 SF.Net is sponsored by: Speed Start Your Linux Apps Now.
 Build and deploy apps  Web services for Linux with
 a free DVD software kit from IBM. Click Now!
 http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] NAnt + Linux problem

2004-02-21 Thread Jaroslaw Kowalski
This may be related to some mono bug, but I'm no longer able to run NAnt on
linux.

I get:

System.NullReferenceException: A null value was found where an object
instance was required
in 0x00068 NAnt.Core.DirectoryScanner:ParseSearchDirectoryAndPattern
(string,string,bool,string)
in 0x000a2 NAnt.Core.DirectoryScanner:ConvertPatterns
(System.Collections.Specialized.StringCollection,System.Collections.Speciali
zed.StringCollection,bool)
in 0x00120 NAnt.Core.DirectoryScanner:Scan ()
in 0x0007c NAnt.Core.Types.FileSet:Scan ()

It turns out that one of the fileset includes element is null.
I use latest mono from CVS, yesterday nightly release build of NAnt.

Any idea ?

Jarek



---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Property Scoping

2004-01-22 Thread Jaroslaw Kowalski
 Oh - we already mention it before. Would be great! And also + operator in
 expressions could be overriden to fileset merge :) And functions with
 fileset argument could exists instead of string as refid to fileset etc
etc
 etc...

The overload is a bad idea. Currently it has problems with strings
(concatenation) vs anything else (addition) and adding another exception
would be even more confusing.

 Still we should be compatible with current id= syntax so typedefs should
 define property of its type?

That would be consistent. We'd have a single build state
(PropertyDictionary) instead of PropertyDictionary for simple values +
DataTypeBaseDictionary for complex values.

 Sum: +1 for it!

 btw: maybe we will find some nicer syntax for merging here? e.g.
 property type=fileset name=id1 value=${id1+id2}/

I would propose:

property name=id1 type=fileset value=${fileset::union(fs1, fs2)} /
property name=id1 type=fileset value=${fileset::intersection(fs1,
fs2)} /
property name=id1 type=fileset value=${fileset::difference(fs1, fs2)}
/

Jarek



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Nightly task docs broken

2004-01-20 Thread Jaroslaw Kowalski
 I already asked Jarek to correct the permissions (or just remove all files
 and directories in nightly/help altogether), but he hasn't responded yet
...
 The permissions set by the nightly build process should be ok, so I assume
 Jarek manually set the permissions ...

Sorry Gert, I didn't know about this problem (probably the email got lost).
I never logged to the sf.net manually, so perhaps the build script must have
broken something.

I've reset the ownership of all other files and directories to nant group,
so you should be able to delete it.

Jarek



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] types merging

2004-01-20 Thread Jaroslaw Kowalski
 Perhaps it would be more efficient to hold off on the patch until more
 people have provided feedback, and until we've decided it in more detail.
 I'd hate to see your efforts go to waste ...

My 0.02 PLN:

1. I don't think merging can be done in a generic way (neither on xml level
nor at the object level)
2. I cannot think of a reason to merge: arg credential proxy
xsltparameter and similar objects and I suggest we focused on filesets
only.
3. Maybe we should start by implementing it the simple way: Make includes
and excludes support filesets (both referenced and nested):

fileset basedir=dir.a
includes file=aaa.txt /
includes fileset=r1 /
includes
fileset basedir=dir.b
includes file=bbb.txt /
/fileset
/includes
excludes fileset=r2 /
excludes
fileset basedir=dir.c
includes file=ccc.txt /
/fileset
includes fileset=r3 /
/excludes
/fileset

4. This approach has the nice property of being side-effect-free - it can be
used in all places where a fileset is expected. I'm not sure how would
fileset ... redefinemode=Append behave in this case.

5. Let's keep it simple and I hope that the idea I've presented for nested
filesets is simple enough.

Jarek



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] types merging

2004-01-20 Thread Jaroslaw Kowalski
BTW. Can you have this? (both reference a named fileset and re-define it ?)

fileset id=aaa refid=aaa
includes name=*.* /
/fileset

Jarek



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] types merging

2004-01-20 Thread Jaroslaw Kowalski
 Not in current implementation. I dont like it much - using both id and
refid
 is little opaque...

 Better to introduce what you suggest in previous mail:
  fileset id=aaa
includes refid=aaa /
includes name=*.* /
  /fileset

To be more readable, I would:

1. Make fileset fail on attempts to define fileset when fileset with the
specified id already exists.
2. Add overwrite=true or redefine=true to suppress this behaviour. Being
more verbose here is a good thing.

fileset id=aaa!-- fails --
includes refid=aaa /
includes name=*.* /
/fileset

fileset id=aaa redefine=true!-- succeeds --
includes refid=aaa /
includes name=*.* /
/fileset

What do you think ?

Jarek



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] types merging

2004-01-20 Thread Jaroslaw Kowalski
 I think this is sufficient in 99.9% scenarios so if we don't find merge be
 useful we could always implement this [I have it in some state already]
 Should such implementation include even excludes from referenced fileset?

I suggest the following evaluation semantics:

fileset
includes name=xxx.* /
includes
fileset
includes name=yyy.* /
/fileset
/includes
excludes
fileset
includes name=*.* /
excludes name=AAA /
/fileset
/excludes
/fileset

Means:

1. find all files matching xxx.* and convert them to the set of filenames
(L1)
2. find all files matching yyy.* and convert them to the set of filenames
(L2)
3. find all files matching *.* and convert them to the set of filenames
(L3)
4. find all files matching AAA.* and convert them to the set of filenames
(L4)

the resulting fileset is (in terms of the set algebra, + means union, -
means difference)

L1 + L2 - (L3 - L4)

so (because we're excluding almost every file but AAA.*) this means the same
as:

fileset
includes name=AAA.* /
/fileset

I propose a rule, which I think is quite intuitive:


Every time you include or exclude a fileset, resolve it to a set of
files and proceed with include/exclude as if it was specified as a series of
include name=... / or exclude name=... /


Awaiting comments.

Jarek



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] types merging

2004-01-20 Thread Jaroslaw Kowalski
 I think this is sufficient in 99.9% scenarios so if we don't find merge be
 useful we could always implement this [I have it in some state already]
 Should such implementation include even excludes from referenced fileset?

I suggest the following evaluation semantics:

fileset
includes name=xxx.* /
includes
fileset
includes name=yyy.* /
/fileset
/includes
excludes
fileset
includes name=*.* /
excludes name=AAA /
/fileset
/excludes
/fileset

Means:

1. find all files matching xxx.* and convert them to the set of filenames
(L1)
2. find all files matching yyy.* and convert them to the set of filenames
(L2)
3. find all files matching *.* and convert them to the set of filenames
(L3)
4. find all files matching AAA.* and convert them to the set of filenames
(L4)

the resulting fileset is (in terms of the set algebra, + means union, -
means difference)

L1 + L2 - (L3 - L4)

so (because we're excluding almost every file but AAA.*) this means the same
as:

fileset
includes name=AAA.* /
/fileset

I propose a rule, which I think is quite intuitive:


Every time you include or exclude a fileset, resolve it to a set of
files and proceed with include/exclude as if it was specified as a series of
include name=... / or exclude name=... /


Awaiting comments.

Jarek



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] types merging

2004-01-20 Thread Jaroslaw Kowalski
Sorry for my previous example. The resulting fileset should be empty because
files cannot be both xxx.* and AAA.*.

Jarek

 the resulting fileset is (in terms of the set algebra, + means union, -
 means difference)

 L1 + L2 - (L3 - L4)

 so (because we're excluding almost every file but AAA.*) this means the
same
 as:

 fileset
 includes name=AAA.* /
 /fileset



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Re: [Nant-users] Force csc recompilation

2004-01-13 Thread Jaroslaw Kowalski
You mean the same task used for cleaning? Why?

csc output=... buildmode=clean
/csc

Jarek

 I don't mind, but we should perhaps consider having a buildmode or
 something, which can be set to Build (default), Rebuild, Clean, 
 
 Gert
 


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Bug #875664

2004-01-13 Thread Jaroslaw Kowalski
I couldn't reproduce the bug, but I have some idea from the analysis of the
*.sln/*.csproj files:

Looks like Uts.NgfEngine.Test.csproj contains a reference with no
HintPath:

Reference
Name = nunit.framework
AssemblyName = nunit.framework
/

that may be causing the problem (this is the only potential reason for
NullReferenceException) in the mentioned line:

   at NAnt.VSNet.Reference..ctor(Solution solution, ProjectSettings ps,
XmlElement elemReference, SolutionTask solutionTask, String outputDir) in
C:\DevTools\NAnt\src\NAnt.VSNet\Reference.cs:line 153

Mark, can you temporarily remove this project from solution or remove/add
again reference to nunit.framework.dll ???
Be sure to check if it actually adds HintPath to the *.csproj file.

Jarek
- Original Message - 
From: Mark Watts [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, January 13, 2004 9:39 PM
Subject: RE: [nant-dev] Bug #875664


 Gert/All,
 Jaroslaw Kowalski, has contacted me off list and we are working to resolve
 this issue.

 Thanks
 -Mark

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, January 13, 2004 15:25
  To: Mark Watts; [EMAIL PROTECTED]
  Subject: Re: [nant-dev] Bug #875664
 
  Would be great if you could attach a zip file containing all
  files necessary to reproduce this issue to the bug report ...
 
  Gert
 
  -Original Message-
  From: Mark Watts [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, January 13, 2004 07:16 PM
  To: [EMAIL PROTECTED]
  Subject: [nant-dev] Bug #875664
  
  I just updated bug #875664, with a bit more detail.  Does
  anyone have
  any suggestions on what the appropriate fix for this problem
  might be?
  I am dead in the water as long as this problem exists.
  
  Thanks
  
  -Mark
  
  
  
  
  ---
  This SF.net email is sponsored by: Perforce Software.
  Perforce is the Fast Software Configuration Management
  System offering
  advanced branching capabilities and atomic changes on 50+ platforms.
  Free Eval! http://www.perforce.com/perforce/loadprog.html
  ___
  nant-developers mailing list
  [EMAIL PROTECTED]
  https://lists.sourceforge.net/lists/listinfo/nant-developers
  
  
  
 
  --
  Telenet Webmail opent je wereld
 
 
 



 ---
 This SF.net email is sponsored by: Perforce Software.
 Perforce is the Fast Software Configuration Management System offering
 advanced branching capabilities and atomic changes on 50+ platforms.
 Free Eval! http://www.perforce.com/perforce/loadprog.html
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] ?

2004-01-10 Thread Jaroslaw Kowalski
Hi Giuseppe!

 Are there also changes related to the uptodate task?
 The following fragment doesn't work anymore:

 uptodate
   targetfile=figures/project-structure.gif
   sourcefile=${build.dir}/figures/project-structure.xcf
   property=project-structure.gif.uptodate/
 ifnot test=${project-structure.gif.uptodate}
   exec
 program=xcftoall
 commandline=
 --gif --output=${build.dir}/figures/image.gif figures/image.xcf/
 /ifnot

Yes. We've decided that for single-file cases one should use function
instead, so you should write:

if test=${not file::up-to-date(build.dir +
'/figures/project-structure.xcf',
 'figures/project-structure.gif')}

exec ... /
/if

Alternatively you may use uptodate with filesets:

uptodate
targetfiles
includes name=figures/project-structure.gif /
/targetfiles
sourcefiles
includes name=${build.dir}/figures/project-structure.xcf /
/sourcefiles
/uptodate

BTW. Gert, what do you think about allowing sub-expression evaluation in
strings so that we could write:

if test=${not
file::up-to-date('${build.dir}/figures/project-structure.xcf',
 'figures/project-structure.gif')}
/if

Jarek



---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] ?

2004-01-10 Thread Jaroslaw Kowalski
I'll add this. One question: using nested expressions, we can have things
like this: (note the double quotes)

echo message=string::length('aaa ${string:length('''')} ccc')} /

or even (quadruple quotes):

echo message=string::length('${string::length(''aaa
${string:length()} ccc'')}')} /

Do we want to allow this?
I'd say - let's support nesting up to one level deep. What to you think?

Jarek

- Original Message - 
From: Scott Hernandez [EMAIL PROTECTED]
To: NAnt Developers [EMAIL PROTECTED]
Sent: Saturday, January 10, 2004 8:10 PM
Subject: Re: [nant-dev] ?


 Nested expression support sounds like a must, no? Somehow I thought our
 expression engine already supported this.

 - Original Message - 
 From: Jaroslaw Kowalski [EMAIL PROTECTED]
 [snip]
  BTW. Gert, what do you think about allowing sub-expression evaluation in
  strings so that we could write:
 
  if test=${not
  file::up-to-date('${build.dir}/figures/project-structure.xcf',
   'figures/project-structure.gif')}
  /if
 
  Jarek



 ---
 This SF.net email is sponsored by: Perforce Software.
 Perforce is the Fast Software Configuration Management System offering
 advanced branching capabilities and atomic changes on 50+ platforms.
 Free Eval! http://www.perforce.com/perforce/loadprog.html
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] custom functions with the script task

2004-01-08 Thread Jaroslaw Kowalski
 OK - I think we can do without the definefunctions attribute though. 
 I'll just make the implicit script class a FunctionSet behind the scenes 
 and remove the constraint that you have to have a ScriptMain.

What about the namespace?

Jarek


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] custom functions with the script task

2004-01-08 Thread Jaroslaw Kowalski
 I think add the namespace attribute but make it non-required. Just the
 global namespace if its present. Since none of the built-in functions
 reside in the global namespace that shouldn't be a problem.

I'm afraid there's no global namespace ;-( And parser does rely on the fact
that every function is prefix::function-name()...

Jarek



---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] filesets

2004-01-07 Thread Jaroslaw Kowalski
Can you add remove and intersect modes for completeness?
This way we'd have all operators found in set theory.

Examples:
Assuming f1 contains: [1,4]

mode=replace with arguments [1,2] produces [1,2]
mode=append with arguments [2,3,4] produces [1,2,3,4] (A u B)
mode=intersect with arguments [1,2,3] produces [1] (A ^ B)
mode=remove with arguments [1,2] produces [4] (A ^ ~B)

BTW. How to copy the fileset and store it with a different name?

Jarek

- Original Message - 
From: Martin Aliger [EMAIL PROTECTED]
To: Ian MacLean [EMAIL PROTECTED]
Cc: ! nant [EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 4:00 PM
Subject: Re: [nant-dev] filesets


  I haven't looked at in detail yet Martin but I will. Somthing to
  consider is that a solution that performs the merge upon the raw xml of
  the multiple definitions would/should work for all datatypes without the
  derived class having to implement MergeWith. Thats what we discussed
  previously but it may be that your solution is a better way to do it.

 Hmm. Ok. It'd be quite easy to modify it if needed... Just tell me if you
 prefer that way.

 Martin

 
  Ian
 
 
  Martin Aliger wrote:
 
  Hi all,
  
  Here are patches to enable all stuff we discussed. I haven't any test
 cases
  and docs are missing in most places as well. If you like the patch I'll
 add
  that!.
  
  Now script like this:
  
   fileset id=1
includes name=1/
includes name=3/
   /fileset
  
   fileset id=1 mode=replace
includes name=2/
includes name=4/
   /fileset
  
   fileset id=1 mode=append
includes name=1/
includes name=5/
   /fileset
  
  will define fileset with id 1 with items 2,4,1,5 (in order). Merged
 items
  are in AsIs field of original fileset so merges with different
  basedirs/excludes/whatever should work.
  
  Script also enable to (re)define types in if and foreach subtasks.
  Executing tasks/types in project level, target level and container
level
 is
  unified to new function in Project.cs (ExecuteNode) [cleaning of code]
  
  Currently no more types that FileSet support merge but enable that is
  straighforward. Just override method MergeWith (defined in BaseType).
 Base
  method just throws BuildException.
  
  Martin
  
  - Original Message - 
  From: Ian MacLean [EMAIL PROTECTED]
  To: Jaroslaw Kowalski [EMAIL PROTECTED]
  Cc: Martin Aliger [EMAIL PROTECTED]; ! nant
  [EMAIL PROTECTED]
  Sent: Monday, January 05, 2004 2:04 PM
  Subject: Re: [nant-dev] filesets
  
  
  
  
  The method Martin proposed has been discussed before. It would be
tidier
  from a user point of view to allow adding to filesets without a
seperate
  task - maybe using the mode attribute on the fileset itself
  
  fileset id=f1 basedir=c:\temp\foo mode=append | replace 
!-- 
  
  
  re-define f1 fileset --
  
  
  includes name=item1/
  includes name=item2/
 /fileset
  
  Martin - how does your implementation perform the merging ? Do you
merge
  
  
  the raw xml of the old f1 fileset with that of the new definition and
  instantiate a new fileset instance based on that ?
  
  
  Ideally this would work for all dataTypes - not just filesets. If
its
  
  
  doable for filesets doing it for all datatypes won't be much more work.
  
  
  Ian
  
  
  Jaroslaw Kowalski wrote:
  
  
  
  How about a modify-fileset task? Like this:
  
  modify-fileset id=f1 mode=add | delete | replace
 fileset
 /fileset
  /modify
  
  It would take either replace the f1 with the contents of fileset,
  
  
  add
  
  
  new items or delete matching items.
  
  Jarek
  - Original Message - 
  From: Martin Aliger [EMAIL PROTECTED]
  To: ! nant [EMAIL PROTECTED]
  Sent: Monday, January 05, 2004 12:13 PM
  Subject: [nant-dev] filesets
  
  
  
  
  
  
  Hi all,
  
  this snippet:
   if test=${1==1}
fileset id=f1 basedir=c:\temp\foo
 includes name=item3/
/fileset
   /if
  is currently not possible because type definitions are allowed only
at
  project or task level. Is it intended or should we allow this as
well?
  
  
  I'm working on extension that will allow this:
fileset id=f1 basedir=c:\temp\foo!-- define f1
 fileset --
 includes name=item1/
 includes name=item2/
/fileset
  
   if test=${1==1}
   fileset id=f1 basedir=c:\temp\foo!-- extend existing f1
  
  
  
  
  fileset
  
  
  
  
  with new item --
 includes name=item3/
 includesFileset refid=f1/
   /fileset
   /if
  
  that means - extending existing filesets. Use in the foreach is also
  possible... What do you think about that?
  
  Martin
  
  
  
  ---
  This SF.net email is sponsored by: IBM Linux Tutorials.
  Become an expert in LINUX or just sharpen your skills.  Sign up for
  
  
  IBM's
  
  
  Free Linux Tutorials.  Learn everything from the bash shell to sys
  
  
  admin.
  
  
  Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click

Re: [nant-dev] custom functions with the script task

2004-01-07 Thread Jaroslaw Kowalski
Nice.

I also though about it some time ago. Wouldn't it be cleaner to write it
like the following?

script language=C# definefunctions=true namespace=test
[Function(test-func)]
public string Testfunc(  ) {
return some result ;
}
/script

Most parts of the script code are constant, anyway. The parts could be added
automatically by the script task.
I also think that we shouldn't require the user to provide Function
attributes here. We'd just take all public functions and add them to the
TypeFactory. [Function] could be used to override the default name here.

Jarek

- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 4:31 PM
Subject: [nant-dev] custom functions with the script task


 I just committed a small change to ScriptTask to allow the definition of
 custom functions inside a script task instance - see example below:
 This is quite nice as it means people can easily prototype new functions
 without having to compile and load a dedicated task/function assembly.
 Note that the script still requires a ScriptMain even if its empty.

  script language=C#
 code![CDATA[
 public static void ScriptMain(Project project) {

 }
 [FunctionSet(test, Test)]
 public class TestFunctions : FunctionSetBase {

 public TestFunctions(Project project, PropertyDictionary
 propDict) : base(project, propDict) {
 }
 [Function(test-func)]
 public static string Testfunc(  ) {
 return some result ;
 }
 }

 ]]/code
  /script
 echo message=${test::test-func()} /
 ...

 -- 
 Ian MacLean, Developer,
 ActiveState, a division of Sophos
 http://www.ActiveState.com



 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
 Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] custom functions with the script task

2004-01-07 Thread Jaroslaw Kowalski
 script language=C# function=Testfunc
 return some result ;
 /script

That can't be done because you need the type information for formal
parameters and returned value.

Jarek



---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] can't post a problem to this list

2004-01-07 Thread Jaroslaw Kowalski

- Original Message - 
From: Tim Dallmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 8:49 PM
Subject: [nant-dev] can't post a problem to this list


 Hi,

 I keep getting the following message every time I try to post an error to
 this forum:

 You message from [EMAIL PROTECTED] to
[EMAIL PROTECTED]
 has been DISCARDED due to a word or phrase thought to be objectionable by
our
 filters.  Please review the message and try again.

Strange. If you have problems, you can send the report to me and I'll repost
it. Perhaps this has something to do with encoding or other email client
settings.

Jarek



---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] [Fwd: [Nprof-developers] Re: solution task]

2004-01-06 Thread Jaroslaw Kowalski
Some time ago I proposed a syntax to allow the ultimate customization of
solution task.
It was something like:

solution configuration=Release outputdir=${output.dir}
includevsfolders=false showcommands=true
projects
 includes name=${build.dir}/**/*.csproj/
/projects

override project=*.csproj
param name=VisualStudioProject/CSHARP/Build/Settings/@DelaySign
value=True /
 override file=File1.cs
param name=@BuildAction value=Compile /
/override
/override

override project=**/Project1/*.csproj
compiler-args/codepage:1250/compiler-args
/override
/solution

Each override would be processed after the project is loaded into memory
and it matches the project attribute. The algorithm would be:

1. For each param, find the XML node specified by name XPath attribute
2. Set the value of this node as specified in value attribute

The idea is simple, yet allows for ultimate extensibility. Perhaps we might
even think about adding / removing items specified by XPath.
For parameters, that aren't there in the *.csproj file we'd have special
tags, like compiler-args mentioned above.

Applications:

1. To override some flag in all C# projects, you use: override
project=**/*.csproj /
2. To override some flag in all VB projects, you use: override
project=**/*.vbproj /
3. To override some flag in all VB projects, you use: override
project=**/*.vcproj /
4. To exclude some file from compilation, use:

 override file=File1.cs
param name=@BuildAction value=Content /
/override

What do you think ?

Jarke

- Original Message - 
From: Matthew Mastracci [EMAIL PROTECTED]
To: Nant-Developers (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, January 06, 2004 7:27 PM
Subject: [nant-dev] [Fwd: [Nprof-developers] Re: solution task]




  Original Message 
 Subject: [Nprof-developers] Re: solution task
 Date: Tue, 06 Jan 2004 11:09:22 -0700
 From: Matthew Mastracci [EMAIL PROTECTED]
 To: Martin Aliger [EMAIL PROTECTED],
 [EMAIL PROTECTED]
 References: [EMAIL PROTECTED]

 Sounds good to me too - just ensure that you've got compilerargs
 specified by language.  There's a number of flags that are valid for a
 single compiler only.

 Martin Aliger wrote:

  Hi all !
 
  1/
  Do you think, that now is good time to some cleaning and restructuring
  in solution task as we discussed earlier? I have some spare time and
  appetite to do that now!
 
  2/
  Also I would need (and like to) make some improvements to that task.
  What I need (and currently use not-commited patch) is need to custom
  arguments override like there:
 
  solution configuration=Release outputdir=${output.dir}
  includevsfolders=false showcommands=true
 projects
  includes name=${build.dir}/**/*.csproj/
 /projects
 assemblyfolders
  includes name=${output.dir}/
  includes name=${nunit.dir}/
  includes name=${references.dir}/
 /assemblyfolders
 compilerargs
  arg value=/codepage:1250/
 /compilerargs
  /solution
  We previously discuss that as it will be nice to do that at solution
  level or at project level. Do you still like the idea? I could implement
  that if you agree with that...
 
  Regards,
  Martin
 



 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
 Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
 ___
 Nprof-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nprof-developers




 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
 Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] filesets

2004-01-05 Thread Jaroslaw Kowalski
How about a modify-fileset task? Like this:

modify-fileset id=f1 mode=add | delete | replace
fileset
/fileset
/modify

It would take either replace the f1 with the contents of fileset, add
new items or delete matching items.

Jarek
- Original Message - 
From: Martin Aliger [EMAIL PROTECTED]
To: ! nant [EMAIL PROTECTED]
Sent: Monday, January 05, 2004 12:13 PM
Subject: [nant-dev] filesets


 Hi all,

 this snippet:
   if test=${1==1}
fileset id=f1 basedir=c:\temp\foo
 includes name=item3/
/fileset
   /if
 is currently not possible because type definitions are allowed only at
 project or task level. Is it intended or should we allow this as well?


 I'm working on extension that will allow this:
fileset id=f1 basedir=c:\temp\foo!-- define f1 fileset --
 includes name=item1/
 includes name=item2/
/fileset

   if test=${1==1}
   fileset id=f1 basedir=c:\temp\foo!-- extend existing f1
fileset
 with new item --
 includes name=item3/
 includesFileset refid=f1/
   /fileset
   /if

 that means - extending existing filesets. Use in the foreach is also
 possible... What do you think about that?

 Martin



 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
 Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Single NAnt binary for all platforms

2004-01-04 Thread Jaroslaw Kowalski
Ok. Unfortunately I'm using VS.NET 2003 so I'll add it by hand to the CSPROJ
file. Not sure if this won't break things.

Jarek
- Original Message - 
From: Gert Driesen [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]; Scott Hernandez
[EMAIL PROTECTED]; ! nant [EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 3:49 PM
Subject: Re: [nant-dev] Single NAnt binary for all platforms



 - Original Message - 
 From: Jaroslaw Kowalski [EMAIL PROTECTED]
 To: Gert Driesen [EMAIL PROTECTED]; Scott Hernandez
 [EMAIL PROTECTED]; ! nant [EMAIL PROTECTED]
 Sent: Sunday, January 04, 2004 2:59 PM
 Subject: Re: [nant-dev] Single NAnt binary for all platforms


  OK. Can we merge the patches then? They don't seem to be doing any harm,
 and
  they could allow us to implement runtime detection in the future. What
do
  you think, Gert?

 Sure, go ahead.  Don't forget to add the new PlatformHelper class to the
c#
 project file.

 Gert




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Single NAnt binary for all platforms

2004-01-03 Thread Jaroslaw Kowalski
Hi!

As Mono is progressing towards 1.0, I think we should start thinking about a
binary distribution of NAnt that would run unmodified on all CLI platforms.

I've done some review of the NAnt source code and looks like there are no
fundamental problems that would prevent us from achieving this soon.

Here are my thoughts:

1. Some code (actually very little) is P/Invoke dependent. This code should
be isolated and put in one place.

2. There is one bug in Mono which requires NAnt to use conditional
compilation to overcome the bug. Vide _timeout in ExternalProgramBase.cs.
There's no reason why this should be done at compile time.

3. Some task assemblies aren't made to work with Mono yet. Win32Tasks and
VSNet tasks. What about solution task then?

4. I've tried to run mono win log4net.dll compiled for .NET 1.0 and it
works fine. In fact this version should run just fine on all CLI platforms
because NAnt doesn't use any platform specific features of log4net.

5. I'm not sure about other binaries in lib directory. Are there any
limitations of mono that prevent us from using .NET 1.0 binaries on all
platforms? The DLLs are 6 months old, I believe we've seen a huge progress
in Mono world since then.

To address issues 1  2 I've prepared a patch that attempts to fix the
issues.

With these fixes in place I was able to rebuild NAnt on Windows, move
binaries to Linux (removing VSNetTasks and Win32Tasks) and rebuild NAnt
completely on Linux without resorting to makefile.

Can you review it and tell me your opinion?

Jarek


mono.diff
Description: Binary data


[nant-dev] Fixes for NAntSchemaTask

2004-01-03 Thread Jaroslaw Kowalski
Hi!

I've noticed that nantschema task is broken, so I sat down and fixed it
(Scott - I hope you don't mind ;-).

I've attached the result of my work for you to review.

Changes/new features:

1. Basically I've rewritten most of NAntSchemaGenerator, simplified the code
and removed unused functions.

2. The produced schema is now valid (previously it didn't validate because
of duplicate names) and can be used as an input to xsd.exe for example. XSD
can generate correct C# code that will parse the NAnt file back into memory.

3. The resulting NAnt.xsd works like a charm in Visual Studio.NET 2003
allowing for full autocomplete. Just place it in:

C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Packages\schemas\xml\NAnt.xsd or something similar and add
xmlns to your project:

project ... xmlns=http://nant.sf.net/schemas/nant-0.85.win32.net-1.0.xsd;

4. I've simplified the resulting XSD also - instead of a bunch of nested
xs:sequence I use xs:choice which takes much less space. The schema size
is 86 KB (previously was over 100KB)

The only problem I've noticed is documenters tag on NDocTask, but
obviously this cannot be generated automatically from the current code
because it's not structured.

Jarek


nant_schema_patch.zip
Description: Zip compressed data


[nant-dev] Documentation for Expressions and Functions

2004-01-02 Thread Jaroslaw Kowalski
Hi guys!

I've juest committed two new fundamentals pages regarding Expressions and
Functions.

I'm not a native English speaker, and I don't feel my English is good enough
to write documentation. Can someone take a look at the files and fix
grammar/spelling errors?

Jarek



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] EE + types support [was SUBMISSION: Path Task]

2003-12-19 Thread Jaroslaw Kowalski
 3/
 I'm also thinking about fileset support. Could be possible to extend
 relation between tasks/types/functions? I mean, many tasks now use
filesets.
 What about functions? Could be nice in some cases... E.g.:

 fileset id='f1'!-- define fileset --
   includeList ...
 /fileset
 ...
 foreach ... property=dir
 if test=${ not fileset::contains(f1,dir)
   fileset id='f1'!-- extend existing fileset --
include name=${dir}/
   /fileset
 /if
 /foreach
 ...
 !-- use fileset --

This can be easily done because expression evaluator is able to handle
values and expressions of almost any type. One concern only: should f1 in
your example go like that? Shouldn't we prefix it with something, like:

if test=${not fileset::contains(fileset::get-by-name('f1'),dir)}
/if

I think it's better not to change the semantics of simple names, like f1
because today they mean properties and nothing else.

Jarek



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] EE + types support [was SUBMISSION: Path Task]

2003-12-19 Thread Jaroslaw Kowalski
BTW. Expression support is in the latest daily build, so you should be able
to try it out. It's also in CVS HEAD now.  You can play with functions and
fileset support. It could be an interesting addition to NAnt.

Jarek
- Original Message - 
From: Jaroslaw Kowalski [EMAIL PROTECTED]
To: Martin Aliger [EMAIL PROTECTED]; ! nant
[EMAIL PROTECTED]
Sent: Friday, December 19, 2003 3:49 PM
Subject: Re: [nant-dev] EE + types support [was SUBMISSION: Path Task]


  3/
  I'm also thinking about fileset support. Could be possible to extend
  relation between tasks/types/functions? I mean, many tasks now use
 filesets.
  What about functions? Could be nice in some cases... E.g.:
 
  fileset id='f1'!-- define fileset --
includeList ...
  /fileset
  ...
  foreach ... property=dir
  if test=${ not fileset::contains(f1,dir)
fileset id='f1'!-- extend existing fileset --
 include name=${dir}/
/fileset
  /if
  /foreach
  ...
  !-- use fileset --

 This can be easily done because expression evaluator is able to handle
 values and expressions of almost any type. One concern only: should f1
in
 your example go like that? Shouldn't we prefix it with something, like:

 if test=${not fileset::contains(fileset::get-by-name('f1'),dir)}
 /if

 I think it's better not to change the semantics of simple names, like f1
 because today they mean properties and nothing else.

 Jarek



 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
 Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] basedir semantics change?

2003-12-19 Thread Jaroslaw Kowalski
Hi Matt.

Can you please check that it's not expression evaluator that's causing the
problem (it was recently added to CVS/nightly build). There's a new option
disable-ee that can be used to revert to the old behaviour.

Jarek

- Original Message - 
From: Matthew Mastracci [EMAIL PROTECTED]
To: Nant-Developers (E-mail) [EMAIL PROTECTED]
Sent: Friday, December 19, 2003 10:14 PM
Subject: [nant-dev] basedir semantics change?


 Has somebody modified the project basedir semantics?  The latest CVS
 version isn't working correctly for me.  It's acting as if the basedir
 attribute wasn't specified.

 I'll try to find out the date that it was busted, but I'm curious if
 anyone remembers changing anything to do with this.

 This is a CVS checkout+build from this morning.  Last working was my
 last checkout a few weeks ago.

 Matt.


 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
 Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] SUBMISSION: Path Task

2003-12-14 Thread Jaroslaw Kowalski

We already have tasks:

sysinfo
tstamp
available
if

that are basically readonly (they only change properties) and are just used
to retrieve/calculate some information. We have four ways of doing so, why
add fifth one? I think this should be done as a function ONLY:

property name=somepath value=c:\temp\test.txt /
property name=basename
value=${path::get-file-name-without-extension(somepath)} /

It's both readable and can be used in all places, like CSC task:

csc output=${path::combine(path::get-directory-name(somefile),
'outputfile.dll')}
...
/csc

or:

csc output=${path::get-directory-name(somefile)}/outputfile.dll
...
/csc

Try it:

http://jaak.sav.net/nant-ee/nant-ee-test4.zip

Jarek

- Original Message - 
From: Gert Driesen [EMAIL PROTECTED]
To: Ian MacLean [EMAIL PROTECTED]; William E Caputo
[EMAIL PROTECTED]
Cc: Nant-Developers (E-Mail) [EMAIL PROTECTED]
Sent: Sunday, December 14, 2003 11:21 AM
Subject: Re: [nant-dev] SUBMISSION: Path Task


 start-rant

 Guess this will be the start of many dilemma's ... I'm pretty sure there
 will always be people that prefer xml build elements only, and actually
 that's also one of my concerns ... I'd hate to see build files reduced to
 large chunks of scripts ...

 As long as we allow build authors to choose themselves I certainly have no
 problem with the expression eval support, I actually like it very much,
but
 we should give build authors a choice in this matter ...

 I'm definitely not saying that we should provide a task alternative for
 every function we support in the expression eval, but by not providing
task
 support for basic build tasks, we're actually forcing build authors to
 use expression support ...

 /end-rant

 If we decide to add William's task, I think we should :
 - add it to NAntContrib first
 - split it up into at least 3 tasks, like Ant has : dirname, basename,
 and path-combine (or something, doesn't exist in Ant)

 What do you think ?

 Gert

 - Original Message - 
 From: Ian MacLean [EMAIL PROTECTED]
 To: William E Caputo [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Sunday, December 14, 2003 5:38 AM
 Subject: Re: [nant-dev] SUBMISSION: Path Task


  This looks good William. However I'm thinking that the new function
  support will be easier to use to do this kind of stuff.
 
  the following path related functions will be included:
 
  path.changeextension
  path.combine
  path.getdirectoryname
  path.getextension
  path.getfilename
  path.getfilenamewithoutextension
  path.getfullpath
  path.getpathroot
  path.gettempfilename
  path.gettemppath
  path.hasextension
  path.ispathrooted
 
  Ian
 
  William E Caputo wrote:
 
  (This is a resend. I didn't see it come across the list the first time
I
  sent it. My apologies if it comes through twice)
  
  Hi All,
  
  Attached is a zip file containing a task called path. This task
extracts
  path information from a given partial (or complete) path name and
  optionally expands it to a fully-qualified path, using either the
current
  working directory or the Project's base directory as the root, and
places
  in a designated property.
  
  I looked through the list of tasks and didn't see anything that did
  something like this (and we needed it) so after implementing it in a
  script task, I decided to code it up as a full-fledged task and submit
it
  in the hope that it will be useful to others.
  
  I wrote it is as being in the Nant.Core namespace because that is where
  copy and mkdir are (and we seem to always be manipulating paths in our
  build files) but if the project's admins prefer that it be a somewhere
  else in NAnt or submitted to NAntContrib instead that is fine by me (I
  didn't cross post, but I will send it to that list if you like).
  
  The task is accompanied by 12 tests, and is fully documented.
  
  Best,
  Bill
  
  William E. Caputo
  ThoughtWorks, Inc.
  http://www.williamcaputo.com
  
  idia ktesis, koine chresis
  
  Hi All,
  
  Attached is a zip file containing a task called path. This task
extracts
  path information from a given partial (or complete) path name and
  optionally expands it to a fully-qualified path, using either the
current
  working directory or the Project's base directory as the root, and
places
  in a designated property.
  
  I looked through the list of tasks and didn't see anything that did
  something like this (and we needed it) so after implementing it in a
  script task, I decided to code it up as a full-fledged task and submit
it
  in the hope that it will be useful to others.
  
  I wrote it is as being in the Nant.Core namespace because that is where
  copy and mkdir are (and we seem to always be manipulating paths in our
  build files) but if the project's admins prefer that it be a somewhere
  else in NAnt or submitted to NAntContrib instead that is fine by me (I
  didn't cross post, but I will send it to that list if you like).
  
  The task is accompanied by 12 tests, and is fully 

Re: [nant-dev] SUBMISSION: Path Task

2003-12-14 Thread Jaroslaw Kowalski
 Tasks should offer functionality on a much higher level than functions ...

Here's my dream about NAnt:

1. Tasks should actually DO something. That something is: compile, create,
delete, XSL transform, update from cvs, send email, run unit tests, install,
uninstall, start/stop services, start/kill processes, compress/decompress.

There'are actually some tasks that do nothing like that, but they direct the
build process:

call
description
fail
if
ifnot
include
loadtasks
nant
property
script

These should be definitely kept.

2. I would consider removing any task that is neither used to direct the
build process nor noes something - as described above.
My candidates for removal are:

sysinfo
tstamp
available

3. I'm also thinking about removing:

readregistry(maybe not, because it can be used to read many values at
once)
xmlpeek (maybe not, because it's a nice pair to xmlpoke)

4. I also think that if should be restructured to include only test
attribute.

if propertytrue= / would become if test=${} /
if propertyexists= / would become if
test=${nant::property-exists('')} /
if targetexists= / would become if
test=${nant::target-exists('')} /

ifnot should be eliminated, because you can always write not in
expressions.

So:

ifnot propertytrue=/ would become if test=${not } /
ifnot propertyexists=/ would become if test=${not
nant::property-exists('')} /
ifnot targetexists=/ would become if test=${not
nant::target-exists('')} /

5. There's a problem with uptodatefile, but I think this should go into
another task or a function. Like:

check-up-to-date property=
target-files
includes name=... /
/target-files
source-files
includes name=... /
/source-files
/check-up-to-date

A function that would be useful for single-file to single-file comparison:

if test=${file::is-newer-than('file1','file2')} /

6. With these changes we'd have an if task that would be clean and we'd
get rid of sysinfo, tstamp, available

7. All above syntax changes could be done automatically with the help of a
simple XSLT file that would rewrite buildfiles.

Jarek



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] SUBMISSION: Path Task

2003-12-14 Thread Jaroslaw Kowalski
Should I add Deprecated attribute to propertyexists, propertytrue and
taskexists in EE-patches?

Jarek
- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]
Cc: Gert Driesen [EMAIL PROTECTED]; William E Caputo
[EMAIL PROTECTED]; Nant-Developers (E-Mail)
[EMAIL PROTECTED]
Sent: Sunday, December 14, 2003 12:57 PM
Subject: Re: [nant-dev] SUBMISSION: Path Task


 +1 on the if task refactoring.  I'm not sure about removing sysinfo
 though. I realize that a getenv() function would provide equivalent
 functionality, however I like the fact that I just need to do
 sysinfo/
 and then I have access to the environment block without having to call
 any more functions. Maybe I have just a fondness for the current way of
 doing it. :)

 Ian


 Jaroslaw Kowalski wrote:

 Tasks should offer functionality on a much higher level than functions
...
 
 
 
 Here's my dream about NAnt:
 
 1. Tasks should actually DO something. That something is: compile,
create,
 delete, XSL transform, update from cvs, send email, run unit tests,
install,
 uninstall, start/stop services, start/kill processes,
compress/decompress.
 
 There'are actually some tasks that do nothing like that, but they direct
the
 build process:
 
 call
 description
 fail
 if
 ifnot
 include
 loadtasks
 nant
 property
 script
 
 These should be definitely kept.
 
 2. I would consider removing any task that is neither used to direct the
 build process nor noes something - as described above.
 My candidates for removal are:
 
 sysinfo
 tstamp
 available
 
 3. I'm also thinking about removing:
 
 readregistry(maybe not, because it can be used to read many values
at
 once)
 xmlpeek (maybe not, because it's a nice pair to xmlpoke)
 
 4. I also think that if should be restructured to include only test
 attribute.
 
 if propertytrue= / would become if test=${} /
 if propertyexists= / would become if
 test=${nant::property-exists('')} /
 if targetexists= / would become if
 test=${nant::target-exists('')} /
 
 ifnot should be eliminated, because you can always write not in
 expressions.
 
 So:
 
 ifnot propertytrue=/ would become if test=${not } /
 ifnot propertyexists=/ would become if test=${not
 nant::property-exists('')} /
 ifnot targetexists=/ would become if test=${not
 nant::target-exists('')} /
 
 5. There's a problem with uptodatefile, but I think this should go into
 another task or a function. Like:
 
 check-up-to-date property=
 target-files
 includes name=... /
 /target-files
 source-files
 includes name=... /
 /source-files
 /check-up-to-date
 
 A function that would be useful for single-file to single-file
comparison:
 
 if test=${file::is-newer-than('file1','file2')} /
 
 6. With these changes we'd have an if task that would be clean and we'd
 get rid of sysinfo, tstamp, available
 
 7. All above syntax changes could be done automatically with the help of
a
 simple XSLT file that would rewrite buildfiles.
 
 Jarek
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 


 -- 
 Ian MacLean, Developer,
 ActiveState, a division of Sophos
 http://www.ActiveState.com



 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] SUBMISSION: Path Task

2003-12-14 Thread Jaroslaw Kowalski
Ok. Should we do something with uptodatefile before the merge? If we do so,
we can deprecate ifnot as well.

Jarek

- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]
Cc: Gert Driesen [EMAIL PROTECTED]; William E Caputo
[EMAIL PROTECTED]; Nant-Developers (E-Mail)
[EMAIL PROTECTED]
Sent: Sunday, December 14, 2003 2:14 PM
Subject: Re: [nant-dev] SUBMISSION: Path Task


 Sounds good to me.

 Ian
 Jaroslaw Kowalski wrote:

 Should I add Deprecated attribute to propertyexists, propertytrue and
 taskexists in EE-patches?
 
 Jarek
 - Original Message - 
 From: Ian MacLean [EMAIL PROTECTED]
 To: Jaroslaw Kowalski [EMAIL PROTECTED]
 Cc: Gert Driesen [EMAIL PROTECTED]; William E Caputo
 [EMAIL PROTECTED]; Nant-Developers (E-Mail)
 [EMAIL PROTECTED]
 Sent: Sunday, December 14, 2003 12:57 PM
 Subject: Re: [nant-dev] SUBMISSION: Path Task
 
 
 
 
 +1 on the if task refactoring.  I'm not sure about removing sysinfo
 though. I realize that a getenv() function would provide equivalent
 functionality, however I like the fact that I just need to do
 sysinfo/
 and then I have access to the environment block without having to call
 any more functions. Maybe I have just a fondness for the current way of
 doing it. :)
 
 Ian
 
 
 Jaroslaw Kowalski wrote:
 
 
 
 Tasks should offer functionality on a much higher level than functions
 
 
 ...
 
 
 
 
 Here's my dream about NAnt:
 
 1. Tasks should actually DO something. That something is: compile,
 
 
 create,
 
 
 delete, XSL transform, update from cvs, send email, run unit tests,
 
 
 install,
 
 
 uninstall, start/stop services, start/kill processes,
 
 
 compress/decompress.
 
 
 There'are actually some tasks that do nothing like that, but they
direct
 
 
 the
 
 
 build process:
 
 call
 description
 fail
 if
 ifnot
 include
 loadtasks
 nant
 property
 script
 
 These should be definitely kept.
 
 2. I would consider removing any task that is neither used to direct
the
 build process nor noes something - as described above.
 My candidates for removal are:
 
 sysinfo
 tstamp
 available
 
 3. I'm also thinking about removing:
 
 readregistry(maybe not, because it can be used to read many
values
 
 
 at
 
 
 once)
 xmlpeek (maybe not, because it's a nice pair to xmlpoke)
 
 4. I also think that if should be restructured to include only test
 attribute.
 
 if propertytrue= / would become if test=${} /
 if propertyexists= / would become if
 test=${nant::property-exists('')} /
 if targetexists= / would become if
 test=${nant::target-exists('')} /
 
 ifnot should be eliminated, because you can always write not in
 expressions.
 
 So:
 
 ifnot propertytrue=/ would become if test=${not } /
 ifnot propertyexists=/ would become if test=${not
 nant::property-exists('')} /
 ifnot targetexists=/ would become if test=${not
 nant::target-exists('')} /
 
 5. There's a problem with uptodatefile, but I think this should go
into
 another task or a function. Like:
 
 check-up-to-date property=
target-files
includes name=... /
/target-files
source-files
includes name=... /
/source-files
 /check-up-to-date
 
 A function that would be useful for single-file to single-file
 
 
 comparison:
 
 
 if test=${file::is-newer-than('file1','file2')} /
 
 6. With these changes we'd have an if task that would be clean and
we'd
 get rid of sysinfo, tstamp, available
 
 7. All above syntax changes could be done automatically with the help
of
 
 
 a
 
 
 simple XSLT file that would rewrite buildfiles.
 
 Jarek
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 
 
 
 -- 
 Ian MacLean, Developer,
 ActiveState, a division of Sophos
 http://www.ActiveState.com
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 
 


 -- 
 Ian MacLean, Developer,
 ActiveState, a division of Sophos
 http://www.ActiveState.com



 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us

Re: [nant-dev] SUBMISSION: Path Task

2003-12-14 Thread Jaroslaw Kowalski

 PS.  Sorry if I sometimes sound negative about expression support ... I
 really like and appreciate what you've done so far, but I just want to be
 sure we're doing the right thing and not let you guys get carried away in
 your enthousiasm too fast :-)  But I agree that its really exciting stuff,
 and I hope to find time soon enough to dive in as well ...

Actually your comments are very helpful. Keep them coming ;-) You convinced
me and Ian that we should support properties with dashes and functions with
the syntax: prefix::function-name-with-dashes().

Jarek



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Property and function names

2003-12-13 Thread Jaroslaw Kowalski
Hi!

Quick Summary: This message discusses changes that are going to be made to
NAnt, which may break your build files in future releases. Before we make
it, we'd like to hear your opinion on the subject

As you may know, there's an ongoing effort to implement expression evaluator
for NAnt. We'll be supporting expressions in all places where property
expansion is supported now. We'll use the same tag: ${...} for both property
expansion and embedded expressions.

Recently, we've discussed various naming conventions for properties and
functions. I'd like to present you with the results, expecting to hear your
opinion.

Please let us know if the proposed changes to naming conventions would break
any of your existing build scripts.

Scroll to the end of this message for instruction for downloading a test
release of NAnt with expression evaluator.

Jarek

PROPERTY NAMES:
===

rationale
Currently, NAnt imposes no restrictions on property names. Basically any
string can be a property name: [EMAIL PROTECTED](*[EMAIL PROTECTED], 12345 or 
even +,-,*,/.
This may cause problems with expression evaluator, so we've decided to
formalize the naming conventions.
/rationale

definition

A valid property name is a sequence of the following characters:

letters 'A' through 'Z' (uppercase or lowercase)
digits '0' through '9'
'_'(underscore)
'.' (dot)
'-' (dash or minus)

The property name must start with a letter or an underscore and must end
with a letter, underscore or digit.

/definition

examples
The following would be legal property names:

propertyname
property.name.with.dots
property-name-with-dashes
property.name-with.both-dots.and-dashes
__property__
property1
property1.0
property2.0.0
_property-2-1__
property-1-name_
property-1.0-name

The following property names would be ILLEGAL:

[EMAIL PROTECTED]@$!@ (contains illegal characters)
.a (starts with a dot)
-a (starts with a dash)
1a (starts with a digit)
a.aaa.a.a.a.a- (ends with a dash)
a.aaa.a.a.a.a. (ends with a dot)
/examples

FUNCTION NAMES:
===

rationale
We need to formally define function names so that they are clean, readable,
maintainable and allow for future expansion. We've decided to follow XPath
style of naming functions. Additionally we've introduced the concept of
prefixes (namespaces) so that similar functions can be groupped by category.
/rationale

definition
Names of all functions available in expression evaluator will have the
following form:

prefix::function-name-with-dashes-to-separate-words()

The prefix is a sequence of the following characters:

letters (a-z - lowercase only)
digits (0-9)

The prefix must start with a letter.

function-name-with-dashes-to-separate-words is a sequence of the following
characters:

letters (a-z - lowercase only)
digits '0' through '9'
'-' (dash)

Function name must start with a letter and must not end with a dash.

Prefix and function name are separated by a double colon operator ::.
/definition

examples
The following function names are LEGAL:

string::starts-with()
cvs::get-file-revision()
nant::property-exists()
file::exists()
directory::exists()
office2000::get-msword-path()
linux::is-kernel-2-6()

The following would be ILLEGAL function names:

::() (prefix must be lowercase)
1::bbb() (prefix must not start with a digit)
::BBB-() (function name must not end with a dash)
::0123aaaBBB() (function name must not start with a digit)
::-()(function name must not start with a dash)
linux::is-kernel-2.6() (contains disallowed character)
linux::is-kernel-2_6() (contains disallowed character)
/examples

HOW TO GET IT:
==

There's a test release of NAnt with expression evaluator support available
at:

http://jaak.sav.net/nant-ee/nant-ee-test4.zip (built with .NET 1.1)

The code is in CVS in branch EE-patches so you may try to compile.

You are encouraged to try to use it on your build files to see if they don't
break.

The ZIP contains preliminary user documentation for functions
(doc/help/functions.html), so you can see what is going to be available.

There's a command line option to disable expression evaluator. Use it if you
have problems and send us the bug report.

If you like screenshots and VIM is your favourite editor, look at the
upcoming feature:

http://jaak.sav.net/nant-ee/vim-screenshot.gif



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Naming of documentation files

2003-12-10 Thread Jaroslaw Kowalski
 The next thing I'll look at is namespace support which would be somthing
 like :

 [CustomFunctionSet(NameSpaceUri=somenamespace, prefix=foo )]


I suggest, that we included something like a category/description which
would be used to generate
the documentation.

[CustomFunctionSet(NameSpaceUri=somenamespace,
Prefix=,
Category=String Functions)]

[CustomFunctionSet(NameSpaceUri=somenamespace,
Prefix=date,
Category=Date/Time Functions)]

We could generate the Function Index page where functions would be
groupped by Category.

We'd have:

String Functions:

length | description for length()
substring | description for substring()
startswith | description for length()

Date/Time Functions:

now | description for now()

and so on... What do you think?

Jarek



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Naming of documentation files

2003-12-10 Thread Jaroslaw Kowalski

Can you add the category stuff or should I do it?

We need:

- a new property 'Category' for 'CustomFunctionSetAttribute'
- changes to the function index to split functions by category
- maybe we should place this information on each function's reference page

Jarek
- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
Cc: Jaroslaw Kowalski [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 3:30 PM
Subject: Re: [nant-dev] Naming of documentation files


 Good work on the userdoc stuff for functions Jarek. I just built after
 syncing your checkins. It looks great - we just need to fill those doc
 comments in now. I can see that  a category is needed though - that
 index page is looking pretty crowede already.

 Ian MacLean wrote:

  The category could also be implemented using a tag in the xml
  comments. The advantage with using an attribute property is that you
  can get the compiler to force the property to be set. Not too bothered
  either way.
 
  Ian
 
  Jaroslaw Kowalski wrote:
 
  The next thing I'll look at is namespace support which would be
  somthing
  like :
 
  [CustomFunctionSet(NameSpaceUri=somenamespace, prefix=foo )]
 
 
 
 
  I suggest, that we included something like a category/description which
  would be used to generate
  the documentation.
 
  [CustomFunctionSet(NameSpaceUri=somenamespace,
 Prefix=,
 Category=String Functions)]
 
  [CustomFunctionSet(NameSpaceUri=somenamespace,
 Prefix=date,
 Category=Date/Time Functions)]
 
  We could generate the Function Index page where functions would be
  groupped by Category.
 
  We'd have:
 
  String Functions:
 
 length | description for length()
 substring | description for substring()
 startswith | description for length()
 
  Date/Time Functions:
 
 now | description for now()
 
  and so on... What do you think?
 
  Jarek
 




 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Naming of documentation files

2003-12-10 Thread Jaroslaw Kowalski
I'll add the category stuff.

BTW. How to do select-distinct in XPath ?

Jarek
- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 4:02 PM
Subject: Re: [nant-dev] Naming of documentation files


 I don't mind. It looks like you have the xslt/userdoc side under
 control. Adding the property CustomFunctionSetAttribute is easy enough.

 Ian

 Jaroslaw Kowalski wrote:

 Can you add the category stuff or should I do it?
 
 We need:
 
 - a new property 'Category' for 'CustomFunctionSetAttribute'
 - changes to the function index to split functions by category
 - maybe we should place this information on each function's reference
page
 
 Jarek
 - Original Message - 
 From: Ian MacLean [EMAIL PROTECTED]
 Cc: Jaroslaw Kowalski [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Wednesday, December 10, 2003 3:30 PM
 Subject: Re: [nant-dev] Naming of documentation files
 
 
 
 
 Good work on the userdoc stuff for functions Jarek. I just built after
 syncing your checkins. It looks great - we just need to fill those doc
 comments in now. I can see that  a category is needed though - that
 index page is looking pretty crowede already.
 
 Ian MacLean wrote:
 
 
 
 The category could also be implemented using a tag in the xml
 comments. The advantage with using an attribute property is that you
 can get the compiler to force the property to be set. Not too bothered
 either way.
 
 Ian
 
 Jaroslaw Kowalski wrote:
 
 
 
 The next thing I'll look at is namespace support which would be
 somthing
 like :
 
 [CustomFunctionSet(NameSpaceUri=somenamespace, prefix=foo )]
 
 
 
 
 I suggest, that we included something like a category/description
which
 would be used to generate
 the documentation.
 
 [CustomFunctionSet(NameSpaceUri=somenamespace,
Prefix=,
Category=String Functions)]
 
 [CustomFunctionSet(NameSpaceUri=somenamespace,
Prefix=date,
Category=Date/Time Functions)]
 
 We could generate the Function Index page where functions would be
 groupped by Category.
 
 We'd have:
 
 String Functions:
 
length | description for length()
substring | description for substring()
startswith | description for length()
 
 Date/Time Functions:
 
now | description for now()
 
 and so on... What do you think?
 
 Jarek
 
 
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 
 


 -- 
 Ian MacLean, Developer,
 ActiveState, a division of Sophos
 http://www.ActiveState.com





---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Function index now splitted by category

2003-12-10 Thread Jaroslaw Kowalski

Answering to myself:

I think it would be good to have functions named:

convert.toint()
convert.tobool()
convert.todate()
convert.tostring()
convert.todouble()

because such functions exist in .NET Class Library so users familiar with
them would be comfortable.

Also, after some thoughts I vote for:

string.contains
string.endswith
string.indexof
string.lastindexof
string.length
string.padleft
string.padright
string.startswith
string.substring
string.tolower
string.toupper
string.trim
string.trimend
string.trimstart

because it may not be obvious what contains, length, trim mean. They
could apply to files on disk, some CVS repository or even a database values
as well.

Note that there's already a function file.length for determining the
length of the file.

Also - I think if() shouldn't be a function, but a language construct.
Without it we cannot support lazy evaluation which is important for
functions that have side effects or take a long time to execute.

That is:

if (somefunction(), formatMyHardDisk(), formatMyHardDisk())

would always format the disk regardless of someFunction() result. Lazy
evaluation will also be used in constructs like:

(1=0 and (anything))
- anything will NEVER be evaluated because we know that it's value is
irrelevant

What do you think?

Jarek

- Original Message - 
From: Jaroslaw Kowalski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 8:35 PM
Subject: [nant-dev] Function index now splitted by category


 I've commited changes to EE-patches that emit function index in userdoc
 groupped by category.

 I have one concern: should we keep some functions unprefixed:

 int()
 bool()
 date()
 string()
 double()

 + all string functions, or should we employ some prefix for them?

 Like convert.int, convert.bool, convert.date, convert.string?

 What about this very special function:

 if (condition,value1,value2)

 Jarek




 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Re: Expression evaluator

2003-12-09 Thread Jaroslaw Kowalski
Ian,

I've committed some changes to EE - mostly cleanup and refactoring.
There's a TODO in ExpressionEvalBase.cs - can you please take a look at it
and tell me how to emit a deprecated warning?

Jarek

- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]
Cc: Martin Aliger [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 3:03 AM
Subject: Re: [nant-dev] Re: Expression evaluator  dash problem


 Lets hold up till I get the custom function loading stuff committed.
 Should be later today or tomorrow.

 Ian

 
 What do you think?
 Can we merge EE-patches with main branch as soon as we have this
semantics
 implemented?
 
 Jarek
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 




 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Re: Expression Eval Question

2003-12-09 Thread Jaroslaw Kowalski
I'm forwarding your question to nant-developers mailing list where Ian is
taking care of loading custom expressions.

Jarek

BTW. I've added LastIndexOf to the core functions in EE as it is generally
useful. It's now in CVS.

- Original Message - 
From: Arif Mohammed [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 6:33 AM
Subject: Expression Eval Question



 Hi,
  I wanted to add another string function LastIndexof to the
 ExpressionEvaluator.cs class..

 I implemented it and created a new Class Library using those classes. How
do
 I use my class library now?
 I have put my class library by name Evaluation.dll  under the
 NANT_INSTALL_DIR\bin folder and I was trying to use the function without
any
 success.
  How do I tell NANT to
look
 for the function iam invoking in my new Class Library(Evaluation.dll).

 Your help would be greatly appreciated

 Thanx
 Arif.



 This message is confidential and may also be legally privileged. If you
are not the intended recipient, please notify [EMAIL PROTECTED]
immediately. You should not copy it or use it for any purpose, nor disclose
its contents to any other person. The views and opinions expressed in this
e-mail message are the author's own and may not reflect the views and
opinions of ADP Wilco.




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Naming of documentation files

2003-12-09 Thread Jaroslaw Kowalski



Hi!

Is there any reason why filenames in NAnt 
help/website are named like this:

fog06.htmlfog13.htmlfog40.htmlfog41.htmlfog42.htmlfog79.htmlfog81.html
 
I'd like to add a section on expressions and 
functions. How should I name the files?
Should I use XSLT/NAntDocumenter to generate the 
documentation or can it be done by hand?

Jarek




Re: [nant-dev] Naming of documentation files

2003-12-09 Thread Jaroslaw Kowalski
I'll use it. I'm quite familiar with XSLT so this shouldn't be a problem.

Do you think that documentation for functions should include anything but a
single-line summary + description of all parameters.

Jarek

- Original Message - 
From: Gert Driesen [EMAIL PROTECTED]
To: Scott Hernandez [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 7:21 PM
Subject: Re: [nant-dev] Naming of documentation files


 would be great if we could use the NAntDocumenter to generate docs for the
 functions if possible ... that's the only way to ensure that the docs are
 always in sync ...

 Gert
 - Original Message - 
 From: Scott Hernandez [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, December 09, 2003 6:35 PM
 Subject: Re: [nant-dev] Naming of documentation files


 Those files are named based on an old system that was used to create them
 (fogcreek something or other).

 You should name your new files something more reasonable. Those files will
 get renamed when someone puts in the request for sf.net admins to rename
 them in cvs. You can edit them manually, but please make sure you keep
them
 xhtml 1.1 valid.

 XSLT/NAntDocumenter are only used to document Tasks and Types (from source
 code xml comments). The rest of the docs are created from the xhtml in the
 doc folder.
   - Original Message - 
   From: Jaroslaw Kowalski
   To: [EMAIL PROTECTED]
   Sent: Tuesday, December 09, 2003 6:07 AM
   Subject: [nant-dev] Naming of documentation files


   Hi!

   Is there any reason why filenames in NAnt help/website are named like
 this:

   fog06.html
   fog13.html
   fog40.html
   fog41.html
   fog42.html
   fog79.html
   fog81.html

   I'd like to add a section on expressions and functions. How should I
name
 the files?
   Should I use XSLT/NAntDocumenter to generate the documentation or can it
 be done by hand?

   Jarek




 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Fw: Expression evaluator changes

2003-12-08 Thread Jaroslaw Kowalski
As my previous e-mail bounced because it was too big (41 KB  40KB limit!)
I'm resending this to the list without the patch.

Again, I encourage everyone to download and try test2 and share your
opinion.

Jarek

- Original Message - 
From: Jaroslaw Kowalski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 08, 2003 1:46 AM
Subject: Expression evaluator changes


 I've made the following changes to the Expression Evaluator:

 1. Allow EE to be disabled from the command line (disableee option ;-)
 2. Added support for dynamic properties (evaluated at use)
 3. Property support expressions containing right curly braces embedded in
 strings (doing full parsing instead of regular expressions)
 4. Require ${} on if test=... /

 Patch against EE-patches is attached - if you have any comments, let me
 know. I'll commit it tomorrow.

 Binary release test2 is available at:

 http://jaak.sav.net/nant-ee/nant-ee-test2.zip

 Try it and let me know.

 Jarek




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Fw: Expression evaluator changes

2003-12-08 Thread Jaroslaw Kowalski
OK. Committed.

Jarek
- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, December 08, 2003 9:23 AM
Subject: Re: [nant-dev] Fw: Expression evaluator changes


 Could you just commit to the branch ? I'd like to merge these changes
 with my custom function loading code.

 Ian

 As my previous e-mail bounced because it was too big (41 KB  40KB
limit!)
 I'm resending this to the list without the patch.
 
 Again, I encourage everyone to download and try test2 and share your
 opinion.
 
 Jarek
 
 - Original Message - 
 From: Jaroslaw Kowalski [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, December 08, 2003 1:46 AM
 Subject: Expression evaluator changes
 
 
 
 
 I've made the following changes to the Expression Evaluator:
 
 1. Allow EE to be disabled from the command line (disableee option ;-)
 2. Added support for dynamic properties (evaluated at use)
 3. Property support expressions containing right curly braces embedded
in
 strings (doing full parsing instead of regular expressions)
 4. Require ${} on if test=... /
 
 Patch against EE-patches is attached - if you have any comments, let
me
 know. I'll commit it tomorrow.
 
 Binary release test2 is available at:
 
 http://jaak.sav.net/nant-ee/nant-ee-test2.zip
 
 Try it and let me know.
 
 Jarek
 
 
 
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 


 -- 
 Ian MacLean, Developer,
 ActiveState, a division of Sophos
 http://www.ActiveState.com




 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Fw: Expression evaluator changes

2003-12-08 Thread Jaroslaw Kowalski
Hi Ian,

What does your custom function loading code do?
I presume that you want to load functions from external dlls and make them
available to EE.

This brings me an idea: as the number of functions EE supports will grow,
we're going to need a concept similar to namespaces and impose some
structure on the naming of functions to be consistent.

I suggest that we leave string and conversion functions as they are now
(they are kind-of core), but change names of all other functions by
prefixing them with their functional area:

round(v) - math.round(v)
floor(v) - math.floor(v)
ceiling(v) - math.ceiling(v)
abs(v) - math.abs(v)

getcreationtime(filename) - file.creationtime(filename)
getlastwritetime(file) - file.lastwritetime(filename)
getlastaccesstime(file) - file.lastaccesstime(filename);
fileexists(file) - file.exists(filename)
filesize(file) - file.size(filename)

now() - date.now
datediff(d1,d2) - date.diff(d1,d2)
dateadd(d1,seconds) - date.add(d1,d2)

Assuming you'd have cvs functions, they would be placed in cvs namespace

cvs.getfilerevision(filename)
cvs.ismodified(filename)
cvs.isbinary(filename)

The function loading code should place loaded functions in a separate
namespace. So could load functions like this:

loadfunctions assembly=AAA.dll type=Functions prefix=aaa /
Assuming class Functions contains:

public static int testme(string a,int b,DateTime c) { }

It sould be accessible as: aaa.testme() not testme(). loadfunctions
shouldn't allow you to load functions into a global namespace.

Another question: should function names be case sensitive? Should they be
upper-, lower- or mixed case ? pascal casing (File.CreationTime()), camel
casing (File.creationTime()) or linux casing (file.creation_time)?

Jarek

- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, December 08, 2003 9:35 AM
Subject: Re: [nant-dev] Fw: Expression evaluator changes


 Awesome, thanks !

 Ian

 Jaroslaw Kowalski wrote:

 OK. Committed.
 
 Jarek
 - Original Message - 
 From: Ian MacLean [EMAIL PROTECTED]
 To: Jaroslaw Kowalski [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, December 08, 2003 9:23 AM
 Subject: Re: [nant-dev] Fw: Expression evaluator changes
 
 
 
 
 Could you just commit to the branch ? I'd like to merge these changes
 with my custom function loading code.
 
 Ian
 
 
 
 As my previous e-mail bounced because it was too big (41 KB  40KB
 
 
 limit!)
 
 
 I'm resending this to the list without the patch.
 
 Again, I encourage everyone to download and try test2 and share your
 opinion.
 
 Jarek
 
 - Original Message - 
 From: Jaroslaw Kowalski [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, December 08, 2003 1:46 AM
 Subject: Expression evaluator changes
 
 
 
 
 
 
 I've made the following changes to the Expression Evaluator:
 
 1. Allow EE to be disabled from the command line (disableee option
;-)
 2. Added support for dynamic properties (evaluated at use)
 3. Property support expressions containing right curly braces embedded
 
 
 in
 
 
 strings (doing full parsing instead of regular expressions)
 4. Require ${} on if test=... /
 
 Patch against EE-patches is attached - if you have any comments, let
 
 
 me
 
 
 know. I'll commit it tomorrow.
 
 Binary release test2 is available at:
 
 http://jaak.sav.net/nant-ee/nant-ee-test2.zip
 
 Try it and let me know.
 
 Jarek
 
 
 
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 
 
 
 -- 
 Ian MacLean, Developer,
 ActiveState, a division of Sophos
 http://www.ActiveState.com
 
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 
 


 -- 
 Ian MacLean, Developer,
 ActiveState, a division of Sophos
 http://www.ActiveState.com




 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net

Re: [nant-dev] Fw: Expression evaluator changes

2003-12-08 Thread Jaroslaw Kowalski
 Do you think the functions need to be defined as static ? I was thinking
 of making them public instance and passing a Project instance to the
 containing objects constructor so that functions can have access to
 various information inside the project - the same as tasks can now. It
 might be worth marking each method with a [NAntCustomMethod] attribute
 so that you can more finely control which methods get exported as
functions.

Your idea looks ok. +1.

 hmm - not sure about the casing. Current nant standard is for lower case
 element and attribute names but no such restraints apply to attribute
 values. Should we just use the .Net casing standards in this case ?

+1 for all-lowercase names.

Jarek



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Re: Expression evaluator dash problem

2003-12-08 Thread Jaroslaw Kowalski
 Hi,

 what I think about dash problem:
 - in writing xml element names (Nant tasks) is common to use dashes

Agreed.

 I see 2 possible way how to enable use of properties (and even
functions)
 with dash in name:

 A/ allow it on lexical level:
 So: if test=${some-long-property - long-function(1)=42}/ it means
 prop - func(1)=42
 but if test=${some-long-property-long-function(1)=42}/ it means
 func(1)=42

And assuming a and b are properties, what would be the result of:
${a-b} ??
I don't understand why should it be different from ${aSPACE-SPACEb}.

Most languages let you place whitespaces around operators so disallowing
this wouldn't be convenient.

 B/ do some property name tweaking before EE run.
 e.g. to replace all - with _
 So u use:
  property name=mine-property value=42/
  if test=${mine_property=42}

 this is not so clean, but quite acceptable. In reality I use this
scenarion
 in mine proprietary [yet] scripting engine which use Python language
(Python
 do not enable dashes in variable names while i'm also in xml and there it
is
 common).

I don't like this approach at all, I think it does more harm than good.

 C/
 Of course, we could disallow dashes in property names as all but it will
 break alot builds I think...

I think that dashes in names should be disallowed or at least deprecated.

There's a function called: propertyvalue() that can be used to access such
properties.
It takes an argument which is a string so you can pass it anything, even
strings which include spaces, dashes - anything.

Jarek



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Re: Expression evaluator dash problem

2003-12-08 Thread Jaroslaw Kowalski
Hi Martin,

I reconsidered your arguments for lexical separation, and I tend to think
that this might be a way to go during the transition period.

   A/ allow it on lexical level:
   So: if test=${some-long-property - long-function(1)=42}/ it means
   prop - func(1)=42
   but if test=${some-long-property-long-function(1)=42}/ it means
   func(1)=42
 

1. There migth be quite a lot of production build scripts already written
which contain properties with dashes. We should support these for some time
while allowing the users to try expression evaluator.
2. No production expressions are written yet because EE has not been
released yet.
3. Let's (temporarily) allow property names defined as:

identifier { [dot|dash] identifier } *

but every time someone uses dash as a separator - we'll produce a big
warning saying it's deprecated and will be removed in future versions.

4. To avoid ambiguities one should use spaces to separate operands from the
MINUS operator.

With these rules in place, I think we'll be able to handle 99% of today's
build scripts. We'll still be failing on scripts that use numeric property
names or anything as weird as that.

Without it EE would break builds containing ${property-name-with-dashes},
which I'm sure, are there in the wild.

What do you think?
Can we merge EE-patches with main branch as soon as we have this semantics
implemented?

Jarek



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] SUMMARY: Expression Syntax

2003-12-07 Thread Jaroslaw Kowalski
Thanks for your opinion Scott.

 Now for the larger question, Does everyone want expression support in
NAnt?

 I think there are some real benefits to adding expression support. It will
 make things much more flexible. But it also means that more complicated
and
 possibly harder to read build files can be built. I don't want to inundate
 our users with features that could make maintenance harder.

I actually think that when we have EE in place, we could gain some
simplicity and ease maintenance by removing or deprecating some tasks and/or
properties.

Take a look at:

available
readregistry
sysinfo
tstamp
xmlpeek
script
if
ifnot

Each of these tasks is used to test or retrieve some values (from
filesystem, registry, system configuration, system clock, XML file).
They are all candidates for predicates available in expression evaluator.

Example 1:
=

Instead of:

available type=File resource=myfile.txt property=myfile.present /
if propertytrue=myfile.present
...
/if

you could simply write:

if test=${fileexists('myfile.txt')}
/if

Example 2:
=

Instead of:
 readregistry property=sdkRoot
key=SOFTWARE\Microsoft\.NETFramework\sdkInstallRoot hive=LocalMachine /

you could write:

property name=sdkRoot
value=${registry.readValue('HKLM\Software\Microsoft\.NETFramework\sdkInstal
lRoot')} /

or even use it in an expression:

if
test=${registry.keyPresent('HKLM','Software\Microsoft\Windows\CurrentVersio
n\Uninstall\NAnt')}
/if

Example 3:
=

Instead of:

tstamp property=build.date pattern=MMdd verbose=true /

one could write:

property name=build.date value=${dateToString(now(),'MMdd')} /

Example 4 (taken from today's question to nant-users):
=

property name=version.build.plus.one value=${version.build + 1} /

(this eliminates the need for script task in some cases)

Example 5:
=

Instead of:

sysinfo /
echo message=PATH is: ${sys.env.PATH} /
echo message=temporary folder is: ${sys.os.folder.temp} /

you could write:

echo message=PATH is: ${getenv('PATH')} /
echo message=temporary folder is: ${gettemppath()} /

This means that property space is less cluttered with system entries.

Jarek



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] SUMMARY: Expression Syntax

2003-12-07 Thread Jaroslaw Kowalski
 By adding expression support we are moving functionality from the tasks
 (defined by xml) to the expression engine. Now I am starting to think
about
 how to add support for extensions to the expression engine; just like I
 think about how to add functionality by creating new tasks. This is the
 slippery slope that I think we need to be careful about.

I think that there's a clear distinction: expressions are pure. They don't
have side effects. They don't change state - neither the program memory nor
property space, filesystem, registry, databases. They only return values
based on current state. Tasks actually do things and may change state.

Currently we have tasks that do nothing but set some properties so that
other tasks could decide upon them. I believe this should be the first (and
probably the last) target.

But, I agree that this is a slippery matter.

 Really I just want to make sure we get the feedback, user comments, and
 support we need for adding this feature. Maybe the next step after we
 discuss this on the dev list is to get together another summary email for
 the user list. Then we can make a final decision about if we want to add
 this new feature to a release.

This is probably the most difficult task. I don't know how many people are
there on the dev list, but test1 release was downloaded by only 16 persons
(distinct IP addresses) and we only got opinions from 4 (not counting
myself).

I think that in order to get most people to test EE we should:

1. Formally define property names (this will break some builds, but is
necessary anyway)
2. Agree on expression syntax (as I understand it - Scott, Ian, Gert, Martin
and myself agree on Q1/A). Q2 is open, but we're close to option A.
3. Provide user documentation and unit tests.
4. As soon as we're sure that EE doesn't break builds, we should move it to
the main branch in CVS so that more people could test it via daily builds.
There should be a command line/config option to turn it off (revert to the
old behaviour) in case it causes any trouble.
5. If there's no common demand for expressions or if it breaks too many
builds - we'll remove it (it's a single change in one file). Perhaps it
could be then moved to a new task, called eval expression=...
property=... /

What do you think?

Jarek



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] SUMMARY: Expression Syntax

2003-12-07 Thread Jaroslaw Kowalski
 Good point about side-effects. This does paint a clear distinction. But
then
 you get tasks like xmlpoke, with no corresponding xmlpeek; this might make
 the user search around for the expression/function to use, or even assume
 that this functionality does not exist.

You're right. Perhaps xmlpeek should stay.

 I'm inclined to give this a day or two to stew, commit the changes to the
 head, if there are no serious issues. We doc, write unit tests, and do a
 release with expression support in a week or less.

That would be great!

 We can also put a switch in our config section, and a command line option,
 to turn it off, as you have suggested.

I'll implement this in EE-patches + I'll write some html docs and make
test2 release for developers when I'm ready. When it's ok we'll move the
patches to the main trunk. Ok?

Jarek



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] PATCH: Expression evaluator for NAnt

2003-12-05 Thread Jaroslaw Kowalski
Hi Gert,

As we're awaiting Scott's opinion on the subject, I have more arguments:

1. Assuming we used $propertyname the proper way to specify properties
inside expressions would be:

${$propertyname}

while currently supported syntax is:

${propertyname}.

Should we get rid of ${propertyname} syntax and change it to
${$propertyname}? It's very difficult IMO.
Introduce another magic tag for specifying expressions? %{$propertyname}.
You could then either use %{$propertyname} or ${propertyname}. Ugly - I
think.

2. Assuming we used ${propertyname} we have the same problem - there are two
legal ways to access properties, which may lead to confusion:

${propertyname} - current form
${${propertyname}} - expression whose value is the value of the
propertyname property

It's also more difficult to parse and you cannot use regular expressions
here because regexes cannot support balancing nested braces.

3. Notation proposed by Martin and implemented by me in test1 doesn't have
these problems:

It's compatible with today's approach to accessing properties (modulo the
mentioned problem with dash character). It allows for easy introduction of
functions and arithmetic expression without uglifying (dollarizing ;-) NAnt
scripts.

BTW. Assuming we have expression evaluator in place, we could get rid of
nant.tasks.TASKNAME syntax at all by replacing it with a function, like
taskexists('taskname'). Similar approach could be used to check for
location of the task: tasklocation('taskname') instead of
nant.tasks.TASKNAME.location. Assuming this, there would be no need to
have properties with dashes in them.

Jarek
- Original Message - 
From: Gert Driesen [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]; Ian MacLean
[EMAIL PROTECTED]; Martin Aliger [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, December 05, 2003 12:12 PM
Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt


 Aren't we making this too difficult for ourselves and for our users here,
by
 not using the $ or ${} delimiters ?

 Perhaps I'm alone on this, but I really have serious doubts on this ...

 Gert

 - Original Message -
 From: Jaroslaw Kowalski [EMAIL PROTECTED]
 To: Ian MacLean [EMAIL PROTECTED]; Martin Aliger
 [EMAIL PROTECTED]
 Cc: Gert Driesen [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 12:00 PM
 Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt


  One more think came to my mind:
 
  Dash (-) is a legal character in property name today and this may
cause
  problems with expression evaluator because you cannot tell the
difference
  between:
 
  property1 MINUS property2 (written as property1-property2)
  and
  very DASH long DASH property DASH name (written as
 very-long-property-name)
 
  I've run script-sample.build from examples directory and found that
 there
  are actually 6 properties with dashes in their names:
 
  nant.tasks.cvs-update
  nant.tasks.cvs-checkout
  nant.tasks.delay-sign
  nant.tasks.cvs-update.location
  nant.tasks.cvs-checkout.location
  nant.tasks.delay-sign.location
 
  Do you think we should do anything special to handle them?
  EE currently supports propertyvalue() function where you can specify
  property name as a string (so no quoting problems will arise). So for
 these
  special properties you would have to write, e.g:
 
  if
 

test=${contains(propertyvalue('nant.tasks.cvs-checkout.location'),'c:\windo
  ws')}
  echo message=zzz /
  /if
 
  Is it ok?
 
  Jarek
 
  - Original Message -
  From: Jaroslaw Kowalski [EMAIL PROTECTED]
  To: Ian MacLean [EMAIL PROTECTED]; Martin Aliger
  [EMAIL PROTECTED]
  Cc: Gert Driesen [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Sent: Wednesday, December 03, 2003 4:26 PM
  Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt
 
 
  
   Can we define properties as:
  
   property name = identifier { separator identifier } *
   separator =  . | -.
   identifier = [a-zA-Z_][a-zA-Z0-9_-]*
  
   In English:
  
   property name is a sequence of identifiers separated by
separators
   separator is a dot
   identifier starts with a latin letter or an underscore and contains
 only
   letters, digits underscores or dashes.
  
   This may affect people using property names with non-latin characters.
  
   Jarek
  
   - Original Message -
   From: Ian MacLean [EMAIL PROTECTED]
   To: Martin Aliger [EMAIL PROTECTED]
   Cc: Jaroslaw Kowalski [EMAIL PROTECTED]; Gert Driesen
   [EMAIL PROTECTED]; [EMAIL PROTECTED]
   Sent: Wednesday, December 03, 2003 3:20 PM
   Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt
  
  
Is anyone actually using numeric property names ? I say we should
dissallow them and be done with it.
   
Ian
   
Martin Aliger wrote:
   
- it won't break compatibility for properties with numeric names
 (eg


${123})
Can you have properties with such names? What's the use for them?
  Maybe


they


should be disallowed

Re: [nant-dev] PATCH: Expression evaluator for NAnt

2003-12-03 Thread Jaroslaw Kowalski
I'll do it when I manage to re-format the code. Unfortunately NAnt coding
style is a bit different than mine. I'm fighting with astyle right now ;-)

Jarek

- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]
Cc: Martin Aliger [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 12:36 PM
Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt


 You've convinced me. It works for backwards compatibility too as you can
 think of the older type of property ${foo} as an expression containing a
 single identifier and so the result of the expression is the value of
 that identifier.

 good work Jarek. Do you want me to commit this to the branch ? or will
 you do it ?

 Ian

 Ian,
 
 Be sure to check my test1 release of EE. I've implemented the syntax
 suggested by Martin and I cannot live without it any more. It's
ultra-clean,
 doesn't break builds (hopefully) and works for all attributes regardless
of
 their type.
 
 One more argument for allowing properties in expressions to be written
 without $: Compare:
 
 echo message=aaa if=${endswith(${somefilename},${extension})} /
 
 with
 
 echo message=aaa if=${endswith(somefilename,extension)} /
 
 The ugliness factor is close to zero in the latter case, IMHO.
 
 Jarek
 
 - Original Message - 
 From: Ian MacLean [EMAIL PROTECTED]
 To: Jaroslaw Kowalski [EMAIL PROTECTED]
 Cc: Martin Aliger [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Wednesday, December 03, 2003 7:01 AM
 Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt
 
 
 
 
 I'd much prefer to see properties still distinguised by the $. Maybe the
 parser can easily determine that its a property but its not so clear for
 a user reading it. Especially since propertys everywhere else require
 the $ syntax.
 
 Ian
 
 Jaroslaw Kowalski wrote:
 
 
 
 It's of course possible to distinguish between property and
 
 
 function()
 
 
 within the parser.
 
 The following interpretation of keywords is very easy to implement:
 
 keyword followed by ( is a function call.
 true/false are boolean literals
 everything else denotes a property
 
 The following would be allowed then (should it be?):
 
 property name=length value= /
 if test=length(length)=8
echo message=ok /
 /if
 
 Jarek
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 
 
 
 -- 
 Ian MacLean, Developer,
 ActiveState, a division of Sophos
 http://www.ActiveState.com
 
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 
 
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?  SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers
 
 


 -- 
 Ian MacLean, Developer,
 ActiveState, a division of Sophos
 http://www.ActiveState.com





---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] PATCH: Expression evaluator for NAnt

2003-12-03 Thread Jaroslaw Kowalski

Can we define properties as:

property name = identifier { separator identifier } *
separator =  . | -.
identifier = [a-zA-Z_][a-zA-Z0-9_-]*

In English:

property name is a sequence of identifiers separated by separators
separator is a dot
identifier starts with a latin letter or an underscore and contains only
letters, digits underscores or dashes.

This may affect people using property names with non-latin characters.

Jarek

- Original Message - 
From: Ian MacLean [EMAIL PROTECTED]
To: Martin Aliger [EMAIL PROTECTED]
Cc: Jaroslaw Kowalski [EMAIL PROTECTED]; Gert Driesen
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 3:20 PM
Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt


 Is anyone actually using numeric property names ? I say we should
 dissallow them and be done with it.

 Ian

 Martin Aliger wrote:

 - it won't break compatibility for properties with numeric names (eg
 
 
 ${123})
 Can you have properties with such names? What's the use for them? Maybe
 
 
 they
 
 
 should be disallowed or deprecated?
 
 
 
 What about output warning when defining property with such name?
 that is on property name=123 value=whatever/ outputs something
like:
 [property] warning: define property with numeric name is not recomended.
[or
 is deprecated.]
 
 Martin
 
 




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] PATCH: Expression evaluator for NAnt

2003-12-03 Thread Jaroslaw Kowalski
I think it that ${ ... }s are good because you can immediately tell where
the expressions are, and they are syntax-highlightable.
Editors like VIM could easily support highlighting function names inside
expressions or even intellisense ;-)

I actually think that

if test=... /

 should always be written as

if test=${...} /

 just for the consistency.

Jarek
- Original Message - 
From: Martin Aliger [EMAIL PROTECTED]
To: Gert Driesen [EMAIL PROTECTED]; Ian MacLean
[EMAIL PROTECTED]
Cc: Jaroslaw Kowalski [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 3:50 PM
Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt


  1. if=${propertyname} = '123'
  or
  2. if=propertyname = '123'

 you need

 if=${propertyname = '123'} right now.


 btw:  Not very convenient in if attributes. They could/should be automatic
 that is without ${}.
 But you could use ${} everywhere e.g.
 echo message=hello ${propertyname='123'} world./
 [writes hello true world.]

 Martin




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Expression Evaluator in CVS

2003-12-03 Thread Jaroslaw Kowalski
Hi!

I've committed expression evaluator (as in test1 release) to CVS in
EE-patches branch.

I think what we now need is:

- unit tests (for ExpressionEval classes alone as they are easily separable
and for NAnt changes.
- user documentation

Unfortunately these tasks cannot be started until we agree on the syntax.

As I understand there are 3 major candidates:

A. echo message=aaa if=${length(propertyname)=3} /
B. echo message=aaa if=${length($propertyname)=3} /
C. echo message=aaa if=${length(${propertyname})=3} /

Currently there are 4 opinions:

Jarek: A
Martin: A
Ian: A or B
Gert: B or C (i can't tell which one exactly)

Another (rather minor) question is:

Should if test=expression / require expression to be surrounded by
${...} (this would allow for full syntax highlighting in some editors) or
not.

Opinions:

Jarek: Yes
Martin: Yes
Ian: ?
Gert: ?

I encourage everyone to try test1 release at

http://jaak.sav.net/nant-ee/nant-ee-test1.zip

or CVS code and report your thoughts to the list.

Jarek



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] PATCH: Expression evaluator for NAnt

2003-12-02 Thread Jaroslaw Kowalski
It's not in yet, but I'm working on adding this to NAnt (startswith and
endswith will be there, too). Some preliminary version should be available
before this weekend in a separate branch of NAnt.

Expression evaluation will be supported in almost all places where you can
specify in NAnt. So instead of:

echo message= if=true /

you will be able to write:

echo message= if=startswith('','a') /

This will work in for all attributes where non-string values are expected
(if, timeout, unless, failonerror, verbose, and all task-specific attributes
like debug,optimize,etc.).

For strings, I'm planning to provide embedded expressions, like:

echo message=the length of the file is: %{filelength(${filename})} /

What do you think?

Jarek

- Original Message - 
From: Martin Aliger [EMAIL PROTECTED]
To: Ian MacLean [EMAIL PROTECTED]; Jaroslaw Kowalski
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 2:26 PM
Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt


 Great! Superb! Maybe I'd love to see startwith and endwith string
functions
 in addition, but great start as Ian said :)

 Is it in already?

 I tried: [with nant-20031128]
   foreach item=String in=${changes} delim=  property=folder
   property name=name value=${folder}.dll/
   if test=indexof('.Test.dll','${name}'==0
 ...

 and no luck :( :

 BUILD FAILED

 C:\temp\server\GINIS.NET.build(84,5):
[if]  at least one if condition must be set (propertytrue,
 targetexists, etc...):

 Total time: 0.6 seconds.

 Martin

 - Original Message - 
 From: Ian MacLean [EMAIL PROTECTED]
 To: Jaroslaw Kowalski [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, November 21, 2003 7:14 AM
 Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt


  Jaroslaw,
  Awesome ! Checking it out now. Obviously this is another thing to go in
  post 0.84 but this looks like a great start.
  Thanks !
 
  Ian
 
  Hi!
  
  As I've promised some time ago on the list, I've implemented a simple,
 yet
  very powerful, expression evaluator for NAnt. See below for a full list
 of
  features.
  You can now write quite sophisticated expressions, like:
  
  if test=tolower(${somefilename}) = ${someotherfilename} + '.txt'
  ...
  /if
  
  I've added my parser to NAnt.Core.ExpressionEval namespace and I've
  modified
  if and ifnot tasks to support a new attribute called test (named
 after
  XSLT ;-)
  
  It's ultra-easy to add new functions. You simply add new public C#
 function
  in NAnt/Core/ExpressionEval/ExpressionEvaluator.cs and it works!
  
  The code should be considered alpha-quality, but should work in most
 cases.
  I've taken some well-tested parts from another project of mine, yet
some
  parts are new and they may not work correctly in 100% cases.
  
  Can someone please take a look at this patch and commit to CVS if it's
 ok?
  
  Jarek
  
  P.S. No NUnit-style unit tests yet, but I'm working on them.
  
  Full list of features:
  ==
  
  Data types:
  integer, double, string, boolean and date
  
  Operators:
  and, or, not
  =, , , , =, = (because NAnt is XML I'm considering renaming
 them
  to lt, gt, le, ge)
  unary minus,
  +,-,*,/,%(modulo) with natural precedence, braces (), property
 access:
  ${propertyname}
  
  Functions:
  propertyexists(name) - returns true when the property exists, false
  otherwise
  propertyvalue(name) - returns the value of the named property,
fails
  when it's not present
  
  Conversion operators:
  int(a) - converts a to integer (if possible) and returns the value
  double(a) - converts a to double (if possible) and returns the
value
  string(a) - converts a to string and returns the value
  date(a) - converts a to date
  
  String functions:
  
  length(a) - returns the length of the string
  substring(a,b,c) - equivalent to a.Substring(b,c) in .NET
  tolower(s) - returns s converted to lower-case
  toupper(s) - returns s converted to upper-case
  contains(str,subs) - returns true when subs is a substring of str
  indexof(a,b) - equivalent to a.IndexOf(b) in .NET
  padleft(a,b,c) - equivalent to a.PadStart(a,b,c) in .NET
  padright(a,b,c) - equivalent to a.PadEnd(a,b,c) in .NET
  trim(a) - equivalent to a.Trim() in .NET
  trimstart(a) - equivalent to a.TrimStart() in .NET
  trimend(a) - equivalent to a.TrimEnd() in .NET
  
  Math functions:
  
  round(v)
  floor(v)
  ceiling(v)
  abs(v)
  
  File functions:
  
  getcreationtime(filename)
  getlastwritetime(file)
  getlastaccesstime(file)
  fileexists(file)
  filesize(file)
  
  Date functions:
  
  now()
  datediff(d1,d2) - returns date difference in seconds
  dateadd(d1,seconds) - returns d1 + seconds
  
  Here are some examples of things that are known to work, taken from my
 unit
  tests:
  
  Assert(1+2, 3);
  Assert(1+2+3, 6);
  Assert(1+2*3, 7

Re: [nant-dev] PATCH: Expression evaluator for NAnt

2003-12-02 Thread Jaroslaw Kowalski
This looks like a good idea. I'll think about it:

We could have:

echo message=aaa ${length('aaa')} if=someproperty /
echo message=aaa ${length('aaa')} if=length(someproperty) = 3 /
if test=contains(nant.settings.currentframework.description,
'Microsoft')
echo message=We're running on Microsoft! /
/if

But it may break some build scripts which use length and similar keywords
as property names. What should we do then?

Also, since we use XML, there's a problem with , =, , and = operators
which need to be written as lt; gt; which isn't very readable. Shouldn't
we call the operators lt, le, gt, ge (less than, less or equal,
greater than, greater or equal) adding eq (for equality) and ne (for
not-equality) ??? Or should we  allow for both forms?

This way you could have:

echo message=aaa if='aaa' eq someproperty /

Shoud unary boolean negation be not or !?
Should binary boolean operators be and, or or ||,  (amp;amp;) in
XML)

I'm awaiting your opinions.

Jarek

- Original Message - 
From: Martin Aliger [EMAIL PROTECTED]
To: Jaroslaw Kowalski [EMAIL PROTECTED]; Ian MacLean
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 3:44 PM
Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt


 Sounds good!

 embedded expression should maybe use ${...} syntax unless we could break
 some existing buildfiles.

 how property expansion works together with expressions?

 e.g.:
 does echo message=the length of the file is: %{filelength(${filename})}
 /work
 or should I write echo message=the length of the file is:
 %{filelength('${filename}')} / ?

 Maybe, if expressions could use properties directly as variables there
could
 be more straightforward
 %{filelength(filename)} or even with begining ${ to be compatible.
 ${property} than will be property or expression which is the same in that
 case.

 Martin

 - Original Message - 
 From: Jaroslaw Kowalski [EMAIL PROTECTED]
 To: Martin Aliger [EMAIL PROTECTED]; Ian MacLean
 [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 3:27 PM
 Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt


  It's not in yet, but I'm working on adding this to NAnt (startswith and
  endswith will be there, too). Some preliminary version should be
available
  before this weekend in a separate branch of NAnt.
 
  Expression evaluation will be supported in almost all places where you
can
  specify in NAnt. So instead of:
 
  echo message= if=true /
 
  you will be able to write:
 
  echo message= if=startswith('','a') /
 
  This will work in for all attributes where non-string values are
expected
  (if, timeout, unless, failonerror, verbose, and all task-specific
 attributes
  like debug,optimize,etc.).
 
  For strings, I'm planning to provide embedded expressions, like:
 
  echo message=the length of the file is: %{filelength(${filename})} /
 
  What do you think?
 
  Jarek
 
  - Original Message - 
  From: Martin Aliger [EMAIL PROTECTED]
  To: Ian MacLean [EMAIL PROTECTED]; Jaroslaw Kowalski
  [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Tuesday, December 02, 2003 2:26 PM
  Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt
 
 
   Great! Superb! Maybe I'd love to see startwith and endwith string
  functions
   in addition, but great start as Ian said :)
  
   Is it in already?
  
   I tried: [with nant-20031128]
 foreach item=String in=${changes} delim=  property=folder
 property name=name value=${folder}.dll/
 if test=indexof('.Test.dll','${name}'==0
   ...
  
   and no luck :( :
  
   BUILD FAILED
  
   C:\temp\server\GINIS.NET.build(84,5):
  [if]  at least one if condition must be set (propertytrue,
   targetexists, etc...):
  
   Total time: 0.6 seconds.
  
   Martin
  
   - Original Message - 
   From: Ian MacLean [EMAIL PROTECTED]
   To: Jaroslaw Kowalski [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Sent: Friday, November 21, 2003 7:14 AM
   Subject: Re: [nant-dev] PATCH: Expression evaluator for NAnt
  
  
Jaroslaw,
Awesome ! Checking it out now. Obviously this is another thing to go
 in
post 0.84 but this looks like a great start.
Thanks !
   
Ian
   
Hi!

As I've promised some time ago on the list, I've implemented a
 simple,
   yet
very powerful, expression evaluator for NAnt. See below for a full
 list
   of
features.
You can now write quite sophisticated expressions, like:

if test=tolower(${somefilename}) = ${someotherfilename} +
'.txt'
...
/if

I've added my parser to NAnt.Core.ExpressionEval namespace and
I've
modified
if and ifnot tasks to support a new attribute called test
 (named
   after
XSLT ;-)

It's ultra-easy to add new functions. You simply add new public C#
   function
in NAnt/Core/ExpressionEval/ExpressionEvaluator.cs and it works!

The code should be considered alpha-quality, but should work in
most
   cases

Re: [nant-dev] PATCH: Expression evaluator for NAnt

2003-12-02 Thread Jaroslaw Kowalski
  But it may break some build scripts which use length and similar
 keywords
  as property names. What should we do then?

 true :-( Looks we couldn't be 100% compatible... Unless expression
generator
 allows to use length variable/property and length() function in the
same
 time.

It's of course possible to distinguish between property and function()
within the parser.

The following interpretation of keywords is very easy to implement:

keyword followed by ( is a function call.
true/false are boolean literals
everything else denotes a property

The following would be allowed then (should it be?):

property name=length value= /
if test=length(length)=8
echo message=ok /
/if

Jarek



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Expression Evaluator for NAnt - test1

2003-12-02 Thread Jaroslaw Kowalski

Hi!

Here's the first test release of the expression evaluator I'm developing for
NAnt.
I encourage everyone to try it. I'd like to get as much feedback as possible
on it.

Please report:

1. Does it work for you? Bug reports are welcome.
2. Is it useful?
3. Do you find the syntax simple enough? Are the build files more/less
readable?
4. Does it break your existing build files? (it shouldn't!)
5. What functions/data types/conversions/operators/conversions should be
added/removed?
6. What other features would you like to see?

Pre-compiled binaries along with patches to current CVS code can be found
at:
http://jaak.sav.net/nant-ee/nant-ee-test1.zip

Changes:

* new attribute test for if and ifnot which lets you write:

=
if test=property1 = property2 + '.txt'
...
/if
=

* support for expressions in (hopefully) all places where ${propertyname}
syntax could be used:

=
 property name=prop1 value=${'aaa' + 'bbb'} /
 echo message=length of prop1 is: ${length(prop1)} if=${1+2=3} /
=

Jarek

Full list of features:
==

Data types:
integer, double, string, boolean and date

Operators:
and, or, not
=, , , , =, = (because NAnt is XML I'm considering renaming them
to lt, gt, le, ge)
unary minus,
+,-,*,/,%(modulo) with natural precedence, braces (), properties can be
accessed just by providing their name

Functions:
propertyexists(name) - returns true when the property exists, false
otherwise
propertyvalue(name) - returns the value of the named property, fails
when it's not present

Conversion operators:
int(a) - converts a to integer (if possible) and returns the value
double(a) - converts a to double (if possible) and returns the value
string(a) - converts a to string and returns the value
date(a) - converts a to date
bool(a) - converts a to boolean

String functions:

length(a) - returns the length of the string
substring(a,b,c) - equivalent to a.Substring(b,c) in .NET
tolower(s) - returns s converted to lower-case
toupper(s) - returns s converted to upper-case
contains(str,subs) - returns true when subs is a substring of str
indexof(a,b) - equivalent to a.IndexOf(b) in .NET
padleft(a,b,c) - equivalent to a.PadStart(a,b,c) in .NET
padright(a,b,c) - equivalent to a.PadEnd(a,b,c) in .NET
trim(a) - equivalent to a.Trim() in .NET
trimstart(a) - equivalent to a.TrimStart() in .NET
trimend(a) - equivalent to a.TrimEnd() in .NET
startswith(a,b) - equivalent to a.StartsWith(b) in .NET
endswith(a,b) - equivalent to a.EndsWith(b) in .NET

Math functions:

round(v)
floor(v)
ceiling(v)
abs(v)

File functions:

getcreationtime(filename)
getlastwritetime(file)
getlastaccesstime(file)
fileexists(file)
filesize(file)

Date functions:

now()
datediff(d1,d2) - returns date difference in seconds
dateadd(d1,seconds) - returns d1 + seconds

Here are some examples of things that are known to work, taken from my unit
tests:

Assert(1+2, 3);
Assert(1+2+3, 6);
Assert(1+2*3, 7);
Assert(2*1*3, 6);
Assert(1/2+3, 3);
Assert(5.0/(2+8), 0.5);
Assert(double(5)/(2+8), 0.5);
Assert(double(1)/2+3, 3.5);
Assert(1, 1);
Assert(1+2, 3);
Assert(1+2)+(2+1, 6);
Assert(1+2)/(2+1, 1);
Assert(length(''), 0);
Assert(length('')=0, true);
Assert(length('')=1, false);
Assert(length('test'), 4);
Assert(length('test')=4, true);
Assert(length('test')=5, false);
Assert(length('d''Artagnan'), 10);
Assert(length('d''Artagnan')=10, true);
Assert(length('d''Artagnan')=11, false);
Assert(-1, -1);
Assert(--1, 1);
Assert('a' = 'a', true);
Assert('a' = 'b', false);
Assert('a'  'a', false);
Assert('a'  'b', true);
Assert(1 = 1, true);
Assert(1  1, false);
Assert(1 = 2, false);
Assert(1  2, true);
Assert(1.0 = 1.0, true);
Assert(1.0  1.0, false);
Assert(1.0 = 2.0, false);
Assert(1.0  2.0, true);
Assert(true, true);
Assert(false, false);
Assert(true==true, true);
Assert(true==false, false);
Assert(truefalse, true);
Assert(truetrue, false);
Assert(!true, false);
Assert(!false, true);
Assert(!(1=1), false);
Assert(substring('abcde',1,2)='bc', true);
Assert(trim('  ab  ')='ab', true);
Assert(trimstart('  ab  ')='ab  ', true);
Assert(trimend('  ab  ')='  ab', true);
Assert(padleft('ab',5,'.')='...ab', true);
Assert(padright('ab',5,'.')='ab...', true);
Assert(indexof('abc','c')=2, true);
Assert(indexof('abc','d')=-1, true);
Assert(indexof('abc','d')=-1, true);
Assert(round(0.1), 0.0);
Assert(round(0.7), 1.0);
Assert(floor(0.1), 0.0);
Assert(floor(0.7), 0.0);
Assert(ceiling(0.1), 1.0);
Assert(ceiling(0.7), 1.0);
Assert(if(true,1,2), 1);
Assert(if(true,'a','b'), a);
Assert(if(false,'a','b'), b);
Assert(abs(1), 1.0);
Assert(abs(-1), 1.0);
Assert(fileexists('c:\\notthere.txt'), false);

[nant-dev] BSD license for NAnt?

2003-11-27 Thread Jaroslaw Kowalski




Hi!
According to releaseplan.html a "Move to an Apache or 
BSD-style license." is planned for 0.9. As I'm going to contribute some code to 
NAnt (_expression_ evaluator) I have a concern: I'd like my code to be BSD-licensed. Do I need 
to do anything special to be GPL-compatible? Is it ok if I just place the BSD 
header on top of my sources?
Jarek


[nant-dev] PATCH: Expression evaluator for NAnt

2003-11-20 Thread Jaroslaw Kowalski
Hi!

As I've promised some time ago on the list, I've implemented a simple, yet
very powerful, expression evaluator for NAnt. See below for a full list of
features.
You can now write quite sophisticated expressions, like:

if test=tolower(${somefilename}) = ${someotherfilename} + '.txt'
...
/if

I've added my parser to NAnt.Core.ExpressionEval namespace and I've
modified
if and ifnot tasks to support a new attribute called test (named after
XSLT ;-)

It's ultra-easy to add new functions. You simply add new public C# function
in NAnt/Core/ExpressionEval/ExpressionEvaluator.cs and it works!

The code should be considered alpha-quality, but should work in most cases.
I've taken some well-tested parts from another project of mine, yet some
parts are new and they may not work correctly in 100% cases.

Can someone please take a look at this patch and commit to CVS if it's ok?

Jarek

P.S. No NUnit-style unit tests yet, but I'm working on them.

Full list of features:
==

Data types:
integer, double, string, boolean and date

Operators:
and, or, not
=, , , , =, = (because NAnt is XML I'm considering renaming them
to lt, gt, le, ge)
unary minus,
+,-,*,/,%(modulo) with natural precedence, braces (), property access:
${propertyname}

Functions:
propertyexists(name) - returns true when the property exists, false
otherwise
propertyvalue(name) - returns the value of the named property, fails
when it's not present

Conversion operators:
int(a) - converts a to integer (if possible) and returns the value
double(a) - converts a to double (if possible) and returns the value
string(a) - converts a to string and returns the value
date(a) - converts a to date

String functions:

length(a) - returns the length of the string
substring(a,b,c) - equivalent to a.Substring(b,c) in .NET
tolower(s) - returns s converted to lower-case
toupper(s) - returns s converted to upper-case
contains(str,subs) - returns true when subs is a substring of str
indexof(a,b) - equivalent to a.IndexOf(b) in .NET
padleft(a,b,c) - equivalent to a.PadStart(a,b,c) in .NET
padright(a,b,c) - equivalent to a.PadEnd(a,b,c) in .NET
trim(a) - equivalent to a.Trim() in .NET
trimstart(a) - equivalent to a.TrimStart() in .NET
trimend(a) - equivalent to a.TrimEnd() in .NET

Math functions:

round(v)
floor(v)
ceiling(v)
abs(v)

File functions:

getcreationtime(filename)
getlastwritetime(file)
getlastaccesstime(file)
fileexists(file)
filesize(file)

Date functions:

now()
datediff(d1,d2) - returns date difference in seconds
dateadd(d1,seconds) - returns d1 + seconds

Here are some examples of things that are known to work, taken from my unit
tests:

Assert(1+2, 3);
Assert(1+2+3, 6);
Assert(1+2*3, 7);
Assert(2*1*3, 6);
Assert(1/2+3, 3);
Assert(5.0/(2+8), 0.5);
Assert(double(5)/(2+8), 0.5);
Assert(double(1)/2+3, 3.5);
Assert(1, 1);
Assert(1+2, 3);
Assert(1+2)+(2+1, 6);
Assert(1+2)/(2+1, 1);
Assert(length(''), 0);
Assert(length('')=0, true);
Assert(length('')=1, false);
Assert(length('test'), 4);
Assert(length('test')=4, true);
Assert(length('test')=5, false);
Assert(length('d''Artagnan'), 10);
Assert(length('d''Artagnan')=10, true);
Assert(length('d''Artagnan')=11, false);
Assert(-1, -1);
Assert(--1, 1);
Assert('a' = 'a', true);
Assert('a' = 'b', false);
Assert('a'  'a', false);
Assert('a'  'b', true);
Assert(1 = 1, true);
Assert(1  1, false);
Assert(1 = 2, false);
Assert(1  2, true);
Assert(1.0 = 1.0, true);
Assert(1.0  1.0, false);
Assert(1.0 = 2.0, false);
Assert(1.0  2.0, true);
Assert(true, true);
Assert(false, false);
Assert(true==true, true);
Assert(true==false, false);
Assert(truefalse, true);
Assert(truetrue, false);
Assert(!true, false);
Assert(!false, true);
Assert(!(1=1), false);
Assert(substring('abcde',1,2)='bc', true);
Assert(trim('  ab  ')='ab', true);
Assert(trimstart('  ab  ')='ab  ', true);
Assert(trimend('  ab  ')='  ab', true);
Assert(padleft('ab',5,'.')='...ab', true);
Assert(padright('ab',5,'.')='ab...', true);
Assert(indexof('abc','c')=2, true);
Assert(indexof('abc','d')=-1, true);
Assert(indexof('abc','d')=-1, true);
Assert(round(0.1), 0.0);
Assert(round(0.7), 1.0);
Assert(floor(0.1), 0.0);
Assert(floor(0.7), 0.0);
Assert(ceiling(0.1), 1.0);
Assert(ceiling(0.7), 1.0);
Assert(if(true,1,2), 1);
Assert(if(true,'a','b'), a);
Assert(if(false,'a','b'), b);
Assert(abs(1), 1.0);
Assert(abs(-1), 1.0);
Assert(fileexists('c:\\notthere.txt'), false);
Assert(dateadd(${somedate},3600) = ${someotherdate}, true);
Assert('a' + 'b' = 'ab', true);


nant-ee-package.zip
Description: Zip compressed data


Re: [nant-dev] Criteria for next release

2003-11-07 Thread Jaroslaw Kowalski
Can't you just use the binaries from .NET 1.0 on Mono, too ?
You could just ignore some tasks, and it should be fine...

Jarek

- Original Message - 
From: Scott Hernandez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 07, 2003 6:21 AM
Subject: RE: [nant-dev] Criteria for next release


 That is a negative Jason. We will always distribute source with our
binaries. We will
 also always include help/documentation.

 We will also not distribute multiple, and redundant, binaries. There is no
reason to
 distribute 1.0 and 1.1 compiled versions of nant.

 Our goal is to support all .net platforms and frameworks. Right now NAnt
has support for
 the ms .net framework 1.0 and 1.1, as well as limited support for mono (as
mono
 progresses our available features are also growing). Our goal is to
provide binaries
 that meet the minimum framework requirements. In the future I expect our
compiled
 binaries will run on mono out of the dist directly, just like they do on
the ms .net
 frameworks.


 quote who=Morris, Jason
  John,
 
  Thanks for taking up this task...any further progress on releasing the
  first beta or release candidate?
 
  My vote would be for one distribution package with the binaries for each
  .NET framework  in separate directories.  I don't think that we should
  include the documentation or source in the distribution package.  We
  should instead, direct users to the website for documentation.  I would
  include a readme doc that explains the basics of getting things setup
  (for the newbie), but again, refer to a task reference on the web.
 
  From my perspective, if I want the source, I will just get it from SF
  CVS.


 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?   SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Re: [Nant-users] How do one update the AssemblyVersion build number?

2003-09-16 Thread Jaroslaw Kowalski



You can use my trick:

The technique consists of:

1. A plain text file that holds nothing but a version number 
AA.BB.CC.DD (version.txt)
2. A small C# utility that increments one of the components in 
the file (NewBuild.exe)
3.A small C# utility that replaces AssemblyVersion(...) 
in all AssemblyInfo.cs files in your project (ReplaceVersion.exe)
4.A fewNAnt targets to automate the above 
(sample.build)

I keep binaries of NewBuild.exe and ReplaceVersion.exe in CVS 
as they are ultra-small (4KB each). Plus, they are portable because they are CLI 
executables.

You can invoke the targets:


nant updateversion

which update all AssemblyInfo.cs files according to 
"version.txt" contents.

nant newbuild

which will increase the fourth component of "version.txt" and 
update all AssemblyInfo.cs files


nant newrevision

which will increase the third and fourth component of 
"version.txt" and update all AssemblyInfo.cs files


nant newminor

which will increase the second and fourth component of 
"version.txt", zero the third one and update all AssemblyInfo.cs 
files

nant newmajor


which will increase thefirst and fourth component of 
"version.txt", zero the second and third one and update all AssemblyInfo.cs 
files

Jarek

P.S.Because I keep my "version.txt" as plain as 
possible, I am even able to parse individual components from my nant buildfile. 
I can simply use foreach with the delimiter set to a dot and because 
there's only one line - foreach iterates just one time.
- Original Message - 

  From: 
  Daniel Nguyen 

  To: [EMAIL PROTECTED] 
  ; [EMAIL PROTECTED] 
  
  Sent: Tuesday, September 16, 2003 6:57 
  PM
  Subject: [Nant-users] How do one update 
  the AssemblyVersion build number?
  
  
  Greeting,
  My apologies in advance if the 
  followingquestions have been asked before. But, does anyone know 
  how to increase the AssemblyVersion build number everytime it builds? 
  Does NAnt has any task to take care of this?
  Example: 
  [assembly: AssemblyVersion("2003.1.0.0")]
  The number I want to increase 
  is the 3rd digit in the AssemblyVersion.Any help would be greatly 
  appreciated.
  Daniel Nguyen Lanmark Graphics Corporation [EMAIL PROTECTED] 
  
  


sample.build
Description: Binary data


NewBuild.cs
Description: Binary data


ReplaceVersion.cs
Description: Binary data


Re: [nant-dev] RE: [Nant-users] How do one update the AssemblyVersion build number?

2003-09-16 Thread Jaroslaw Kowalski
Title: Message



Yes, it seems to be legal: a snapshot of my 
ILDASM dump:

.assembly extern Sooda{ 
.publickeytoken = (36 D3 1D A5 0D 00 DE DD 
) 
// 6... .ver 1234:1234:1234:5}

Jarek


  - Original Message - 
  From: 
  Anthony LoveFrancisco 

  To: 'Jaroslaw Kowalski' ; 'Daniel Nguyen' ; [EMAIL PROTECTED] 
  ; [EMAIL PROTECTED] 
  
  Sent: Tuesday, September 16, 2003 8:00 
  PM
  Subject: [nant-dev] RE: [Nant-users] How 
  do one update the AssemblyVersion build number?
  
  But does your AssemblyInfo.cs 
  file compile with a value greater than 255 in one of the build number 
  parts?
  
  - 
  Ants
  

-Original Message-From: Jaroslaw 
Kowalski [mailto:[EMAIL PROTECTED] Sent: Tuesday, 16 September, 
2003 10:56To: Anthony LoveFrancisco; 'Daniel Nguyen'; [EMAIL PROTECTED]; 
[EMAIL PROTECTED]Subject: 
Re: [Nant-users] How do one update the AssemblyVersion build 
number?
No problem: I use strings, not 
characters, then Int32.Parse() them.

I've just checked on "0.0.0.5" and 
it works.

Jarek

  - Original Message - 
  From: 
  Anthony LoveFrancisco 
  
  To: 'Jaroslaw Kowalski' ; 'Daniel Nguyen' ; 
  [EMAIL PROTECTED] 
  ; [EMAIL PROTECTED] 
  
  Sent: Tuesday, September 16, 2003 
  7:51 PM
  Subject: RE: [Nant-users] How do one 
  update the AssemblyVersion build number?
  
  In NewBuild.cs, how do 
  you keep each part of the build number from overflowing the upper limit 
  of255?
  
  - 
  Ants
  

-Original Message-From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
Jaroslaw KowalskiSent: Tuesday, 16 September, 2003 
10:33To: Daniel Nguyen; [EMAIL PROTECTED]; 
[EMAIL PROTECTED]Subject: 
Re: [Nant-users] How do one update the AssemblyVersion build 
number?
You can use my trick:

The technique consists of:

1. A plain text file that holds nothing but a version 
number AA.BB.CC.DD (version.txt)
2. A small C# utility that increments one of the 
components in the file (NewBuild.exe)
3.A small C# utility that replaces 
AssemblyVersion(...) in all AssemblyInfo.cs files in your project 
(ReplaceVersion.exe)
4.A fewNAnt targets to automate the above 
(sample.build)

I keep binaries of NewBuild.exe and ReplaceVersion.exe 
in CVS as they are ultra-small (4KB each). Plus, they are portable 
because they are CLI executables.

You can invoke the targets:


nant updateversion

which update all AssemblyInfo.cs files according to 
"version.txt" contents.

nant newbuild

which will increase the fourth component of 
"version.txt" and update all AssemblyInfo.cs files


nant newrevision

which will increase the third and fourth component of 
"version.txt" and update all AssemblyInfo.cs files


nant newminor

which will increase the second and fourth component of 
"version.txt", zero the third one and update all AssemblyInfo.cs 
files

nant newmajor


which will increase thefirst and fourth 
component of "version.txt", zero the second and third one and update all 
AssemblyInfo.cs files

Jarek

P.S.Because I keep my "version.txt" as plain as 
possible, I am even able to parse individual components from my nant 
buildfile. I can simply use foreach with the delimiter set to a 
dot and because there's only one line - foreach iterates just one 
time.
- Original Message - 

  From: 
  Daniel 
  Nguyen 
  To: [EMAIL PROTECTED] 
  ; [EMAIL PROTECTED] 
  
  Sent: Tuesday, September 16, 2003 
  6:57 PM
  Subject: [Nant-users] How do one 
  update the AssemblyVersion build number?
  
  
  Greeting,
  My apologies in advance 
  if the followingquestions have been asked before. But, 
  does anyone know how to increase the AssemblyVersion build number 
  everytime it builds? Does NAnt has any task to take care of 
  this?
  Example: 
  [assembly: AssemblyVersion("2003.1.0.0")]
  The number I want to 
  increase is the 3rd digit in the AssemblyVersion.Any help 
  would be greatly appreciated.
  Daniel Nguyen Lanmark Graphics Corporation [EMAIL PROTECTED] 

  
  


Re: [nant-dev] RE: [Nant-users] How do one update the AssemblyVersion build number?

2003-09-16 Thread Jaroslaw Kowalski
Title: Message



Because you can either provide a 
platform-independend executable and nant willrun it or compile it 
on-the-fly using csc task. So you need nothing but NAnt + your 
project.The source code for both utilities is trivial as opposed to "sed" 
or "awk" sourcecode which requires a rather complicated autoconf/Makefile stuff 
+ a C compiler.

Jarek

P.S. I like "awk" very much, 
though.

  - Original Message - 
  From: 
  Anthony LoveFrancisco 

  To: 'Jaroslaw Kowalski' ; 'Daniel Nguyen' ; [EMAIL PROTECTED] 
  ; [EMAIL PROTECTED] 
  
  Sent: Tuesday, September 16, 2003 8:02 
  PM
  Subject: [nant-dev] RE: [Nant-users] How 
  do one update the AssemblyVersion build number?
  
  I like this suggestion. It's 
  very clean and streamline.
  
  I do have a general question 
  to though: I shot down for suggesting using awk or sed to update the 
  AssemblyInfo.cs because it uses an executable outside of the NAnt framework. 
  Why is this any different?
  
  - 
  Ants
  

-Original Message-From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Jaroslaw 
KowalskiSent: Tuesday, 16 September, 2003 10:33To: 
Daniel Nguyen; [EMAIL PROTECTED]; 
[EMAIL PROTECTED]Subject: 
Re: [Nant-users] How do one update the AssemblyVersion build 
number?
You can use my trick:

The technique consists of:

1. A plain text file that holds nothing but a version 
number AA.BB.CC.DD (version.txt)
2. A small C# utility that increments one of the 
components in the file (NewBuild.exe)
3.A small C# utility that replaces 
AssemblyVersion(...) in all AssemblyInfo.cs files in your project 
(ReplaceVersion.exe)
4.A fewNAnt targets to automate the above 
(sample.build)

I keep binaries of NewBuild.exe and ReplaceVersion.exe in 
CVS as they are ultra-small (4KB each). Plus, they are portable because they 
are CLI executables.

You can invoke the targets:


nant updateversion

which update all AssemblyInfo.cs files according to 
"version.txt" contents.

nant newbuild

which will increase the fourth component of "version.txt" 
and update all AssemblyInfo.cs files


nant newrevision

which will increase the third and fourth component of 
"version.txt" and update all AssemblyInfo.cs files


nant newminor

which will increase the second and fourth component of 
"version.txt", zero the third one and update all AssemblyInfo.cs 
files

nant newmajor


which will increase thefirst and fourth component of 
"version.txt", zero the second and third one and update all AssemblyInfo.cs 
files

Jarek

P.S.Because I keep my "version.txt" as plain as 
possible, I am even able to parse individual components from my nant 
buildfile. I can simply use foreach with the delimiter set to a dot 
and because there's only one line - foreach iterates just one 
time.
- Original Message - 

  From: 
  Daniel Nguyen 
  
  To: [EMAIL PROTECTED] 
  ; [EMAIL PROTECTED] 
  
  Sent: Tuesday, September 16, 2003 
  6:57 PM
  Subject: [Nant-users] How do one 
  update the AssemblyVersion build number?
  
  
  Greeting,
  My apologies in advance if 
  the followingquestions have been asked before. But, does 
  anyone know how to increase the AssemblyVersion build number everytime it 
  builds? Does NAnt has any task to take care of 
  this?
  Example: 
  [assembly: AssemblyVersion("2003.1.0.0")]
  The number I want to 
  increase is the 3rd digit in the AssemblyVersion.Any help 
  would be greatly appreciated.
  Daniel Nguyen Lanmark Graphics Corporation [EMAIL PROTECTED] 
  
  
  


  1   2   >