[Rake-devel] Hello and a little patch for task initialisation

Link, Claudius cla at zuehlke.com
Thu Jul 8 18:14:35 EDT 2004


Hello,

as it is my first post to the list
some information on me (to keep it short only about rake and ruby :-)

I am quite new to ruby and rake but already feel quit OK using both.

Both rake and ruby where adopted were I work to provide an easy and fast
way to create little utilities.

Rake is used to build executables from a model through the use of tools
provided by the modelling IDE.
This make the task sometimes quite challenging, as (virtual) targets
sometime refers to stuff inside the model. Therefore the build dependencies
can't be calculated by time stamps. (Actually we don't know how it is possibly
to calculate the build dependencies and the tool vendors seams to not know
either).

As these virtual targets are build by executing external tools it is
necessary to provide all the data which the tools require.
To encode all this in the task name makes it impossible to call the task
manually.
So idea was to pass arbitrary object to the task definition function instead of
a string. As long as this object provides a to_s() method which returns the
name of the task this is easy and done in the attached patch.
Another suggestion for the improvement of rake (which I think was mentioned on
the list before) would be the lazy evaluation of dependencies. Again this
sometimes bites us as we automatically extract the dependencies from the model.
So
 rake -T
can take quite some time.
I might be possible not to join the dependency sets into @prerequisites on
task creation (enhancement) but rather all given dependency sets untouched 
and separately. On the first usage of @prerequisites (through the collect() 
method) you could than join the deps.

Ok, thats it. Sorry for the long mail and only the short patch ;-)

Regards,
Claudius

PS: There seams to be something similar to rake in python. See
     http://www.scons.org/
    As the have some docs it might be possible to steal^H^H^H^H^Hshare some
    ideas (thanks to OSS).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: name.patch
Type: application/octet-stream
Size: 547 bytes
Desc: name.patch
Url : http://rubyforge.org/pipermail/rake-devel/attachments/20040709/839efe13/name.obj


More information about the Rake-devel mailing list