[Rant-cafe] Bug: task ordering is wrong when dependencies are listed separately
Jon Willesen
rantcafe at wizardwell.org
Thu May 31 19:28:41 EDT 2007
So after looking at the code I see there's an 'enhance' function
available to do this sort of thing. Using the enhance function to add
the dependency works great.
The only reference to 'enhance' that I could find in the documentation
was in rubyproject.rdoc in some example code. Shouldn't this function
be listed under the available functions at the top of rantfile.rdoc?
Or is it not ready for public consumption yet?
--
Jon Willesen
Quoting Jon Willesen:
> I've been looking at replacing our C++ make system with Rant, and I
> noticed some funny behavior. I'm using version 0.5.8.
>
> Here's a Rantfile that demonstrates the problem:
>
> task :cart do
> puts 'cart'
> end
>
> task :horse do
> puts 'horse'
> end
>
> task :cart => :horse
>
> Because of the nature of our system, it'd be nice to list the
> dependencies separately from the task definitions. However, in it's
> current form, the tasks happen in the wrong order. The output is:
>
> C:\rantexp>rant cart
> cart
> horse
>
> Running this same file through rake gets it right:
> C:\rantexp>rake -f Rantfile cart
> (in C:/rantexp)
> horse
> cart
>
> If I change the file so the dependency is listed with the task
> definition, Rant does the right thing:
>
> task :horse do
> puts 'horse'
> end
>
> task :cart => :horse do
> puts 'cart'
> end
>
> C:\rantexp>rant cart
> horse
> cart
>
> --
> Jon Willesen
More information about the Rant-cafe
mailing list