Scott Hernandez wrote:

I've been looking over the implementation and use of DataTypeBase; while I've been making changes to the documentation and metedata utils.
It seems like the following is how things work now.
-- Anything derived from DataTypeBase (with an ElementNameAttribute) can be given an id and referenced later in the build file.
-- These types include FileSet, Argument, Credential, FilterSet (not in use yet), NamespaceImport, and Proxy (and all derived classes).

thats a good summation of where it stands now.


The current implementation is not very useful, IMO (with the exception of the FileSet). It seems like what a user would want to do is not define single elements like an argument (ex. 1) but an argument collection/array (some kind of set; see ex.1a). This is how Ant works (by only allowing you to reference sets and complex types), and it seems to be what I would expect for us too.

Totally. Extending the framework for collections and complex types has been on my todo list for a while - it just hasn't made it to the top of that list yet :)


Also, I would say that static references (ex. 2) are useful but have limited value. It seems like the real value comes when you can do some type of merging. Even a simple xml merge would help; where you take the data type with the id and drop the xml of the refid type onto it. Take example 3, this xml merging would allow you to really re-use that Fileset data type.

sure. Gert and I discussed this previously. Its a good idea. The merge algorithm will be interesting to write.


Our goal should be to support examples 1a and 3 before our next release. Also, we should document "Data Type" behavior and use.

Speaking of which I think we're probably due for another release pretty soon. Its been 7 weeks and 4610 downloads since 0.8.3. 0.9 anyone ?


Patches to support this would great! :) C'mon who likes to write code?

I do ! me me ! Seriously as I said it on my list but if someone wants to pick it up now thats fine. I'll be happy to answer any questions relating to the current implementation. I'm on vacation for 3 weeks from Monday. I'm taking the laptop so I may get to work on this and other nant stuff but I can't make any promises.


Ian

Examples:
1.)
<arg value="arg1" id="a1" />
<exec>
<arg refid="a1"/>
</exec>
1a.)
<args id="a1" >
<arg value="arg1"/>
<arg value="arg2"/>
</args>
<exec>
<args refid="a1"/>
</exec>
2.)
<fileset id="htmlfiles">
<include name="**/*.html"/>
</fileset>
<copy todir="somedir">
<fileset refid="htmlfiles"/>
</copy>
3.)
<fileset id="htmlfiles">
<include name="**/*.html"/>
</fileset>
<copy todir="somedir">
<fileset basedir="dir1" refid="htmlfiles"/>
</copy>






-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to