buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ittay Dror <>
Subject Re: 'super' doesn't invoke super method under drb?
Date Wed, 22 Oct 2008 07:08:50 GMT

Assaf Arkin wrote:
> On Mon, Oct 20, 2008 at 8:14 PM, Victor Hugo Borja <> wrote:
>> On Mon, Oct 20, 2008 at 5:44 AM, Ittay Dror <> wrote:
>>> I have a class that overrides invoke_prerequisites, and at the end calls
>>> 'super'. Without drb all works fine. When used under drb, it is as if the
>>> super method is not called (trace doesn't show the tasks being invoked and
>>> even a print debug in rake isn't printed). Trying to get the method via
>>> self.class.superclass.instance_method returns the right method). Any hints
>>> as to why this might happen?
>> I suppose that was because the first implementation of
>> DRbApplication#clear_invoked_tasks used to clear the tasks hash and recreate
>> each of then with something like .. original_task.class.define_task(...), so
>> if a task had been extended with a module or set some ivars, that
>> information was being lost.
>> The current implementation just reenables the task allowing it to execute
>> again, and restores the original task prerequisites/actions. See the
>> code/specs if you need more details.
>> The current drb impl, recreates only tasks created by buildr itself, those
>> tasks created by your buildfile are just reenabled with clear_invoked_tasks.
> I'm not sure how far you can stretch this.  Each time you load the
> buildfile, you might have different source files or partially built
> files, and tasks that wire themselves differently depending on what
> remains to be built.  For some changes, re-enabling the task is not
> enough, on the repeat run it may build too much or not enough.  I'm
> not sure how people are going to handle the difference between what
> the buildfile should be doing and what goes on in the background.
I agree that a buildfile won't be "drb-able" as-is in most cases. 
However, after making some simple changes, I was able to use my (very 
complex) build under drb. I opened an issue in Jira with some wishes 
that would enable easier integration.

About different source files: I think that in general it is not good to 
read the list of sources from disk during the loading of buildfile as it 
is IO and therefore slow (and with many modules, very noticable)

> Assaf
>> --
>> vic
>> Quaerendo invenietis.

Ittay Dror <>
Tikal <>
Tikal Project <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message