[asdf-devel] Dependency does not trigger recompilation
Robert Goldman
rpgoldman at sift.info
Wed Oct 12 16:48:45 UTC 2011
On 10/12/11 Oct 12 -11:34 AM, Faré wrote:
> On Wed, Oct 12, 2011 at 12:06, Juan Jose Garcia-Ripoll
> <juanjose.garciaripoll at googlemail.com> wrote:
>> I apologize in advance for the stupid newbie question that follows.
>> I have the two systems below. When I change a file in cl-farm, it recompiles
>> it, but when I demand loading of cl-farm-test again, ASDF does not recompile
>> it, even though its dependency has changed. Why? Is this expected.
>> This all is based on the latest ASDF from git, invoked from Slime (but I do
>> not think this makes a difference)
>
> This is bug 479522.
> https://bugs.launchpad.net/asdf/+bug/479522
>
> Somehow, this behaviour exists for backwards compatibility,
> and nobody took wants to take the responsibility for saying
> "we need to break compatibility and just do it".
>
> Also, it isn't clear that the "obvious fix" would work if you
> (asdf:load-system :cl-farm)
> then try to
> (asdf:load-system :cl-farm-test)
> afterwards.
> Something new and magic need to happen about operation-done-p
> and mark-operation-done, so that the depending-on system
> detects that the depended-on system has been recompiled
> in a previous run.
>
> If you take responsibility for writing a patch that does the Right Thing,
> I'll merge it.
>
Yes, Faré is zeroing in on the key challenge. In order to correctly do
dependency tracking across system boundaries, you would have to make
ASDF preserve its state across lisp runs. To see why this is necessary,
consider the case where you recompile cl-farm, close your lisp, start a
new job, and then load-cl-farm-test.
Now, I suppose we could compare the most recent compile date on cl-farm
with the least recent compile date on cl-farm-test to get a partial
solution.
Getting this right is complicated a bit by the odd semantics of the
COMPILE-OP and LOAD-OP when applied to a SYSTEM object. I will not bore
the regular reader of this mailing list by explaining this yet again.
One of the reasons why I think we should change this at ASDF3 is that I
think we could radically simplify this by changing the objects that go
in an ASDF plan to give the plan a hierarchical structure (i.e., make it
so that PERFORMing a compilation on a system INCLUDES all of the
sub-component compilations).
best,
r
More information about the asdf-devel
mailing list