[nant-dev] Fw: Expression evaluator changes
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] Ant's team reaction to msbuild
Where did you find that bit of info ? Ian Gert Driesen wrote: - Original Message - From: Gert Driesen [EMAIL PROTECTED] To: Ian MacLean [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 08, 2003 7:46 AM Subject: Re: [nant-dev] Ant's team reaction to msbuild FYI : the Mono team is planning to implement MSBuild support in the next 4-6 months ... correction : the estimate time to complete is 4-6 months, but implementation has not yet started so ... - Original Message - From: Ian MacLean [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 08, 2003 5:02 AM Subject: [nant-dev] Ant's team reaction to msbuild Some interesting discussion by way of John Lams weblog: http://www.iunknown.com/000371.html There is also some discussion on the use of conditions among the 3 projects ( msbuild, Ant and NAnt ). http://stefanbodewig.blogger.de/stories/10616/ thanks Stefan - I didn't realize you had a blog. :) Ian --- 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] Ant's team reaction to msbuild
On Mon, 08 Dec 2003, Ian MacLean [EMAIL PROTECTED] wrote: thanks Stefan - I didn't realize you had a blog. :) I'm trying to not push it too hard 8-) Stefan --- 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] Ant's team reaction to msbuild
http://www.go-mono.com/mono-todo.htm - Original Message - From: Ian MacLean [EMAIL PROTECTED] To: Gert Driesen [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, December 08, 2003 8:19 AM Subject: Re: [nant-dev] Ant's team reaction to msbuild Where did you find that bit of info ? Ian Gert Driesen wrote: - Original Message - From: Gert Driesen [EMAIL PROTECTED] To: Ian MacLean [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 08, 2003 7:46 AM Subject: Re: [nant-dev] Ant's team reaction to msbuild FYI : the Mono team is planning to implement MSBuild support in the next 4-6 months ... correction : the estimate time to complete is 4-6 months, but implementation has not yet started so ... - Original Message - From: Ian MacLean [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 08, 2003 5:02 AM Subject: [nant-dev] Ant's team reaction to msbuild Some interesting discussion by way of John Lams weblog: http://www.iunknown.com/000371.html There is also some discussion on the use of conditions among the 3 projects ( msbuild, Ant and NAnt ). http://stefanbodewig.blogger.de/stories/10616/ thanks Stefan - I didn't realize you had a blog. :) Ian --- 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 --- 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
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
Re: [nant-dev] Fw: Expression evaluator changes
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
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/lists/listinfo/nant-developers
[nant-dev] Build 20031206 problems
Hi. Downloaded the nightly build 20031206 and tried to compile it using NAnt from within a VS .NET prompt. The results: [nant] C:\Csharp\nant-20031206\tests\NAnt.Core\NAnt.Core.build build Buildfile: file:///C:/Csharp/nant-20031206/tests/NAnt.Core/NAnt.Core .build Target(s) specified: build build: [csc] Compiling 42 files to C:\Csharp\nant-20031206/build/net- 1.1.win32/nant-0.84-debug/bin/NAnt.Core.Tests.dll. BUILD FAILED INTERNAL ERROR System.NotSupportedException: The given path's format is not support ed. at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boo lean needFullPath) at System.Security.Util.StringExpressionSet.AddExpressions(String[] str, Bool ean checkForDuplicates, Boolean needFullPath) at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionA ccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFul lPath, Boolean copyPathList) at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Bo olean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean ov erwrite) at NAnt.DotNet.Tasks.CompilerBase.ExecuteTask() in C:\DOCUME~1\ADMINI~1\LOCAL S~1\Temp\tmp30B.tmp\src\NAnt.DotNet\Tasks\CompilerBase.cs:line 413 at NAnt.Core.Task.Execute() in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp30B.tmp\ src\NAnt.Core\Task.cs:line 151 at NAnt.Core.Target.Execute() in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp30B.tm p\src\NAnt.Core\Target.cs:line 207 at NAnt.Core.Project.Execute(String targetName) in C:\DOCUME~1\ADMINI~1\LOCAL S~1\Temp\tmp30B.tmp\src\NAnt.Core\Project.cs:line 757 at NAnt.Core.Project.Execute() in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp30B.t mp\src\NAnt.Core\Project.cs:line 733 at NAnt.Core.Project.Run() in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp30B.tmp\s rc\NAnt.Core\Project.cs:line 782 Please send bug report to [EMAIL PROTECTED] Total time: 0.1 seconds. BUILD FAILED Also tried to get the corresponding NAntContrib but that zip archive was corrupt no matter how hard I tried to redownload and unzipp. Is it just me, or is it Monday? /Nicke --- 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
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]
Re: [nant-dev] SUMMARY: Expression Syntax
Now for the larger question, Does everyone want expression support in NAnt? I definitely want it! I need it really badly. Currently I'm unable to check some things correctly without expressions (without script or external utility). Expression will be very easy in mine case. It is: foreach item=String in=${changes} delim= property=folder property name=name value=${folder}.dll/ ifnot test=endswith('${name}','.Test.dll') ... /ifnot /foreach very readable (=maintainable), no need to learn script syntax or write any external code. summary: I think expression are really needed in Nant. Just mine 2 cents... Martin btw: expression syntax is maybe incorrect here - but it's not important. --- 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] Depends targets getting executed multiple times in 8.4
After the change to the explicit call behavior, now ensuring all dependencies get called, there has also been a change to the behavior of depends= arguments: These depends targets now always get called also, even if already executed. For example: target name="debug" depends="onetimesetup"/ target name="release" depends="onetimesetup"/ running "nant debug release" results in onetimesetup being called for each target. This is contrary to what I would expect "makelike" behavior to be, and also contrary to the current documentation for target: "A target gets executed only once, even when more than one target depends on it (see the previous example)." I like the change to call so you can more easily call targets as subroutines, but think the former behavior of depends= should be restored. / /br
Re: [nant-dev] Fw: Expression evaluator changes
Jarek, 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. thats correct. It scans assemblies looking for classes marked with a special attribute - then loads MethodInfo objects from those classes into a structure that the eval code can reference later - where it now uses the currenttype in EvaluateFunction and ValidateFunction. The scanning for methods part is pretty much done - I'm just hooking it up to your EE code - I'll probably have a couple of questions as I work thru that. 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 was thinking of namespaces as well. I had in mind a slightly different idea. To use attributes to mark a class as containing custom functions somthing like: [CustomFunctionSet(NameSpaceUri=somenamespace, prefix=foo )] public class BuiltInFunctions : CustomFunctionSetBase { public BuiltInFunctions(Project project) : base(project){ } // function definitions public void SomeFunc(){ } } and then the scanning would just pick this up rather than requiring the user to specify it. I'm allowing functions to be imported from the same assemblies that are currently scanned for tasks ie those in the nant bin dir. Then any extra libs can be added using somthing like the loadfunctions task you describe below. Maybe loadfunctions could override namespace defined with the attribute to prevent duplicate namespace usage if necessary. 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. 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 ? Ian 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 --- 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 dash problem
Hi, what I think about dash problem: - in writing xml element names (Nant tasks) is common to use dashes - we should not disallow this (i'd like to see numeric properties disallowed though) 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 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). C/ Of course, we could disallow dashes in property names as all but it will break alot builds I think... What do you think about it? 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] Fw: Expression evaluator changes
user to specify it. I'm allowing functions to be imported from the same assemblies that are currently scanned for tasks ie those in the nant bin dir. Then any extra libs can be added using somthing like the loadfunctions task you describe below. Maybe loadfunctions could override namespace defined with the attribute to prevent duplicate namespace usage if necessary. +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 ? Maybe we should stay with lowercase (to be consistent). Namespaces are very good idea! It could help readibility alot. +1 here as well. round(v) - math.round(v) getcreationtime(filename) - file.creationtime(filename) now() - date.now cvs.getfilerevision(filename) see: string.endswith() ? [I prefer] or string.endsWith() or string.EndsWith() or string.ends-with() or string.ends_with() 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] Fw: Expression evaluator changes
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
Re: [nant-dev] Fw: Expression evaluator changes
In that case I should check when I'm scanning for methods that they are all lowercase - or we can just map a lowercase name to the correct methodinfo object. So even if you define the method in code as void SomeFunc() it will be mapped to the nant custom function somefunc() and attempting to call SomeFunc() will fail. This is easy enough to do but maybe enforcing lowercase names for the methods would be less confising. what about [NAntCustomFunction(name=somefunc namespace=test desctiption=test function] int SomeFunc(int arg) { return arg*2; } where name and namespace are required attributes? 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] Fw: Expression evaluator changes
That works. I'd rather specifiy the namespace at the class level though. Ian In that case I should check when I'm scanning for methods that they are all lowercase - or we can just map a lowercase name to the correct methodinfo object. So even if you define the method in code as void SomeFunc() it will be mapped to the nant custom function somefunc() and attempting to call SomeFunc() will fail. This is easy enough to do but maybe enforcing lowercase names for the methods would be less confising. what about [NAntCustomFunction(name=somefunc namespace=test desctiption=test function] int SomeFunc(int arg) { return arg*2; } where name and namespace are required attributes? Martin -- 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] Re: verbosity of some tasks
At some point I'd like to use the multiple .resx input of resgen.exe - it would be nice to swallow output if no errors occur and just output: [resgen] Transformed 5 .resx files The solution builds would be a lot easier to read. Perhaps I can compress all of the reference copy operations into a single task call as well. After the 0.84 release, we should focus some of our efforts on refactoring the solution task and have it use the compiler tasks instead... It would be great if you could participate in this effort, as you're the original author ... If you want to, I'd like to help here as well. Solution task need big clean up, I think. Better outputs + logging cleanup is other needed area in mine eyes. 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] Re: Expression evaluator dash problem
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] Nant 0.8.4rc1 csc bug with references
the problem is with resources, sorry! Another problem with resources, I've discovered that since it creates a copy of the ressources files with the full name that the resources will have, which make my build fail due to the fact that the resulting full path to the file is too long. System.IO.PathTooLongException: The path is too long after being fully qualified. Make sure path is less than 260 characters. at System.IO.Path.nGetFullPathHelper(String path, Char[] invalidPathChars, Char[] whitespaceChars, Char directorySeparator, Char altDirectorySeparator, Char volumeSeparator, Boolean fullCheck, String newPath) at System.IO.Path.GetFullPathInternal(String path) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at NAnt.DotNet.Tasks.CompilerBase.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName) at NAnt.Core.Tasks.CallTask.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName) at NAnt.Core.Project.Execute() at NAnt.Core.Project.Run() Nick From: N. V. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [nant-dev] Nant 0.8.4rc1 csc bug with references Date: Mon, 08 Dec 2003 13:58:56 + Hi all, I just tried the 0.8.4rc1 release and found a bug with references in the csc task. When the sources files are read-only (previously retrieved from VSS) the build failed due to the csc task trying to delete the copy of the ressources files it created (with the full name of the ressources). Here is the stack trace of the exception: System.UnauthorizedAccessException: Access to the path c:\local_build\SigmaRHNet\SigmaRHNet\Sigma\General.Tools\GraphicButton\Ressources\Sigma.General.Tools.GraphicButton.Ressources.DefinitionToSvg.xslt is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.File.Delete(String path) at NAnt.DotNet.Tasks.CompilerBase.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName) at NAnt.Core.Tasks.CallTask.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName) at NAnt.Core.Project.Execute() at NAnt.Core.Project.Run() Please send bug report to [EMAIL PROTECTED] Nick _ MSN Search, le moteur de recherche qui pense comme vous ! http://fr.ca.search.msn.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] Re: Expression evaluator dash problem
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] Depends targets getting executed multiple times in 8.4
I have committed the changes to fix this behavior. I will be committing tests later to confirm my expectations, and so this behavior doesn't change without notice again. In short, things should work like this: --Targetsspecified on the command line, or via the nant task, should execute like the dependencies of targets. That is, they should not force execution of the chain of targets. --The call task should execute the whole chain of targets (including already executed dependencies) Now, I've been told that Ant works the way that I would consider ours to be buggy. All targets specified on the command line are executed, including their dep. tree. This makes each target entry on the command line work like a call name="commandlinetarget". This does allow for something like this, "debug build release build", where you can specify that you want to do a debug and release build (without having to specify this in the build file). Well, It is a little confusing how things should work, but they now work like they used to. - Original Message - From: Scott Hernandez To: Buc ; [EMAIL PROTECTED] Sent: Monday, December 08, 2003 11:27 AM Subject: Re: [nant-dev] Depends targets getting executed multiple times in 8.4 Yes, I can confirm this behavior in cvs. This is a bug... :( - Original Message - From: Buc To: [EMAIL PROTECTED] Sent: Monday, December 08, 2003 4:24 AM Subject: [nant-dev] Depends targets getting executed multiple times in 8.4
[nant-dev] Solution Build Bug with resources and default root namespace
I have found a bug in the solution build task when the project default root namespace is an empty string. The embeded resource namespace starts with a '.' when it shouldn't. For examlple, I have a vb class that has a namespace of Test.Project and the project does not have a Root Namespace (empty string). The Manifest-Resource ends up being named '.Test.Project.resources' when is should be 'Test.Project.resources'. When the compiled applications runs i get an error that it can't load the resource ... System.Resources.MissingManifestResourceException : Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. thanks Paul --- 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] Nant 0.8.4rc1 csc bug with references
Thanks Nick, I tracked down the cause of this from an earlier bug report an am working on fix. Thanks for the detailed report. Ian N. V. wrote: the problem is with resources, sorry! Another problem with resources, I've discovered that since it creates a copy of the ressources files with the full name that the resources will have, which make my build fail due to the fact that the resulting full path to the file is too long. System.IO.PathTooLongException: The path is too long after being fully qualified. Make sure path is less than 260 characters. at System.IO.Path.nGetFullPathHelper(String path, Char[] invalidPathChars, Char[] whitespaceChars, Char directorySeparator, Char altDirectorySeparator, Char volumeSeparator, Boolean fullCheck, String newPath) at System.IO.Path.GetFullPathInternal(String path) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at NAnt.DotNet.Tasks.CompilerBase.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName) at NAnt.Core.Tasks.CallTask.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName) at NAnt.Core.Project.Execute() at NAnt.Core.Project.Run() Nick From: N. V. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [nant-dev] Nant 0.8.4rc1 csc bug with references Date: Mon, 08 Dec 2003 13:58:56 + Hi all, I just tried the 0.8.4rc1 release and found a bug with references in the csc task. When the sources files are read-only (previously retrieved from VSS) the build failed due to the csc task trying to delete the copy of the ressources files it created (with the full name of the ressources). Here is the stack trace of the exception: System.UnauthorizedAccessException: Access to the path c:\local_build\SigmaRHNet\SigmaRHNet\Sigma\General.Tools\GraphicButton\Ressources\Sigma.General.Tools.GraphicButton.Ressources.DefinitionToSvg.xslt is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.File.Delete(String path) at NAnt.DotNet.Tasks.CompilerBase.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName) at NAnt.Core.Tasks.CallTask.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName) at NAnt.Core.Project.Execute() at NAnt.Core.Project.Run() Please send bug report to [EMAIL PROTECTED] Nick _ MSN Search, le moteur de recherche qui pense comme vous ! http://fr.ca.search.msn.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] 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
Re: [nant-dev] Solution Build Bug with resources and default root namespace
Hi Paul Which version of nant are you using ? A recent change in the solution task should fix that issue. Either the latest nightly or 0.84 beta 1 will have the fix. beta 1 has a known issue where it fails to build its test library with the following error : build: [csc] Compiling 42 files to C:\000 Code\nant-0.84/build/net-1.1.win32/nant-0.84-debug/bin/NAnt.Core.Tests.dll. BUILD FAILED INTERNAL ERROR ... you should still be able to use the shipping binaries though. Ian Paul Welter wrote: I have found a bug in the solution build task when the project default root namespace is an empty string. The embeded resource namespace starts with a '.' when it shouldn't. For examlple, I have a vb class that has a namespace of Test.Project and the project does not have a Root Namespace (empty string). The Manifest-Resource ends up being named '.Test.Project.resources' when is should be 'Test.Project.resources'. When the compiled applications runs i get an error that it can't load the resource ... System.Resources.MissingManifestResourceException : Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. thanks Paul --- 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] SUMMARY: Expression Syntax
I really need it too. +1 - Mitch Denny - [EMAIL PROTECTED] - http://www.monash.net - +61 (414) 610141 - -Original Message- From: Martin Aliger [mailto:[EMAIL PROTECTED] Sent: Monday, 8 December 2003 11:17 PM To: Scott Hernandez; [EMAIL PROTECTED] Subject: Re: [nant-dev] SUMMARY: Expression Syntax Now for the larger question, Does everyone want expression support in NAnt? I definitely want it! I need it really badly. Currently I'm unable to check some things correctly without expressions (without script or external utility). Expression will be very easy in mine case. It is: foreach item=String in=${changes} delim= property=folder property name=name value=${folder}.dll/ ifnot test=endswith('${name}','.Test.dll') ... /ifnot /foreach very readable (=maintainable), no need to learn script syntax or write any external code. summary: I think expression are really needed in Nant. Just mine 2 cents... Martin btw: expression syntax is maybe incorrect here - but it's not important. --- 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