[DGD] Recursion in recompile(), is this correct?

Bart van Leeuwen bart at wotf.org
Sun Jan 11 00:56:52 CET 2004


Lets go to the example of A inherits B and B inherits C

You changed something in C and try to recompile C.
This will result in an error if you just call compile_object on it, you
will have to dest it and then compile it and you will have to updated code
active.
No calls to recompile() will happen (yet)

Now that you got your new code in C active, you want A to inherit the new
code. To do so, you recompile A by calling compile_object on it.

Before A gets compiled, you will get a call to recompile() with B as its
argument. recompile() does its work and a NEW B is compiled, which
inherits the new C. Then A is compiled using the new B

So, in the above example recompile() only gets called on B, and only
because C was updated.

So, the condition for recompile() to get called is that you have a file
which itself is inherited, and which inherits an outdated version of
another library.

To expand on the above example, lets consider A, which inherits B, which
inherits C, which inherits D. You change D and then upgrade it. Then you
upgrade A and as a result you get 2 calls to recompile() with B and C as
their arguments.

I guess the confusion is due to the word recompile being used a bit
ambigiously throughout docs and conversation :)

Bart


_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list