[Rake-devel] Why do MultiTask and Task send different args to their prerequisites?

Jim Weirich jim.weirich at gmail.com
Wed Nov 21 17:58:40 UTC 2012

On Nov 22, 2012, at 4:33 AM, Michael Bishop <mbishop at me.com> wrote:

> I made a patch in my branch to make these the same. The test-suite runs to completion, but I'm still wary of it since I don't know if there are good reasons for them to be different :)
> https://github.com/michaeljbishop/rake/commit/ca283160b610c95e1f28cf561af8811fd37d10c3=

I like the commit.  It makes the concurrent path look much more like the non-concurrent one.

The new_scope is making a task argument object that is tailored for each task.  For example: if task a with args x and y call prerequisite b with argument x, then task a gets an argument list with "x" and "y" in it and task b gets an argument list with just "x" (and initialized to the value of the the "x" from task a).

The weird thing is that trying to lookup y will still work because of the parent link in the task args.  I'm not sure I like the parent link idea, but that's another issue for another time.

So yes, the multitask path should also invoke new_scope.

If you make this a pull request, I'll merge it.

-- Jim Weirich
-- jim.weirich at gmail.com

More information about the Rake-devel mailing list