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
create,Here's my dream about NAnt:
1. Tasks should actually DO something. That "something" is: compile,
install,delete, XSL transform, update from cvs, send email, run unit tests,
compress/decompress.uninstall, start/stop services, start/kill processes,
theThere'are actually some tasks that do nothing like that, but they direct
atbuild 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
comparison: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="aaaa" /> would become <if test="${aaaa}" /> <if propertyexists="aaaa" /> would become <if test=${nant::property-exists('aaaa')}" /> <if targetexists="aaaa" /> would become <if test=${nant::target-exists('aaaa')}" />
<ifnot> should be eliminated, because you can always write "not" in expressions.
So:
<ifnot propertytrue="aaaa"/> would become <if test="${not aaaa}" /> <ifnot propertyexists="aaaa"/> would become <if test="${not nant::property-exists('aaaa')}" /> <ifnot targetexists="aaaa"/> would become <if test="${not nant::target-exists('aaaa')}" />
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
a<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
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 help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers