[asdf-devel] An interesting ASDF conundrum
Robert Goldman
rpgoldman at sift.info
Sun Jan 6 20:26:03 UTC 2013
This one I think is relevant to the proposed reorganization of ASDF to
have changes in upstream systems trigger recompilation in systems that
depend on them.
I have made a crude component which is a MADE-FILE. The made-file is
built by invoking make to produce some output file.
MADE-FILE's compile-op OPERATION-DONE-P method always returns NIL,
because ASDF does not understand what files the made file depends on --
that information is buried in the makefile. We don't want to duplicate
that logic in ASDF. If we always invoke make, it will do the Right
Thing and only rebuild the file when necessary.
*Unfortunately*, any components in a system that have a :depends-on
relationship to a MADE-FILE, will always be recompiled, whether
necessary or not. If I remember correctly, the logic in traversal is
that you do the child if its input files are fresher than the output
file *or* if one of its dependencies was run.
Now, with current ASDF, I can work around this for MADE-FILEs with
stable APIs: I just shove them out into systems of their own, so they
don't trigger constant recompilations of systems that depend on them.
But this behavior will be changing with the new ASDF.
I don't *believe* the existing controls on :force will solve this
problem, either. We can't control this by simply saying "recompile
everything if any upstream system changes" or "don't recompile anything
based on upstream system changes" (although the latter will restore the
current buggy behavior).
I can think of two solutions:
1. KLUDGY -- allow individual system definitions (like my MADE-FILE
wrapper systems) to specify that they do not propagate recompilation
forcing onto their dependents.
2. BETTER, but bigger effect on the protocol: Separate the question of
whether an operation is performed on a dependency from whether that
dependency propagates change downstream. We could do this by adding a
function that is run to test whether an <operation,component> pair
propagates forcing onto its dependents. By default it would be the same
as "did the operation get performed?" as now, but it could be overridden
by component classes like MADE-FILE where, e.g., I could say "did the
file-write-date of the OUTPUT-FILES change?"
Does this make sense?
cheers,
r
More information about the asdf-devel
mailing list