[Rake-devel] Rake circular dependency patch

Assaf Arkin assaf at labnotes.org
Fri Jun 8 17:03:15 EDT 2007

On 6/8/07, Mat Schaffer <schapht at gmail.com> wrote:
> Hi, folks.  I read Assaf Arkin's June 6 post about Rake and circular
> task dependencies and felt like hacking ruby for a bit.  So I put
> together a patch against rake's trunk for the code he worked out.
> Original post:
> http://blog.labnotes.org/2007/06/06/rake-hack-im-not-sleeping-just-
> caught-in-a-circular-dependency/
> Patch on trunk is attached.  I modified it slightly because (a) his
> code wasn't against trunk and (b) it looks like separate threads are
> already getting separate stacks without Asaf's modification of the
> MultiTask class.



We have some test cases [1] (RSpec, only the first set is relevant). Each
thread indeed gets a new stack, but without the change to MultiTask, each of
the parallel tasks will start from a fresh stack, and won't be able to
detect circular dependencies that started before the multitask.

The last test in [1] checks that and will fail without this change to


[1] http://www.intalio.org/buildr/trunk/test/rake_ext.rb

Hope attaching the file is sufficient.  Let me know if you'd prefer
> and inline patch or some other kind of patch.  This just 'svn diff'.
> -Mat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rake-devel/attachments/20070608/0b3e69fd/attachment.html 

More information about the Rake-devel mailing list