[asdf-devel] Fixing asdf-sytem-connections
fahree at gmail.com
Sun Mar 9 00:15:01 UTC 2014
> I am using asdf-system-connections and notice a glitch in its design. As the
> original author no longer maintains it, I'm try to fix this myself. This
> system is designed to allow the loading of a connected system (say "A")
> automatically when two or more dependent systems (say "B" and "C") are
> loaded. The problem I'm encountering is that when another system (say "D")
> is defined to depend on B and C, then A is not loaded until after D is done
> loading, but D may need the definitions in A. asdf-system-connections
> defines a function load-connected-systems which does the work of loading the
> connected system definitions, but this is called from a new #'operate :after
> method which apparently doesn't get called until A is done loading.
If you depend on A rather than merely on B and C, then
the obvious solution is to depend on A.
Actually, I would go so far as to discourage use of asdf-system-connections,
and encourage only explicit dependency on connection systems.
IIUC, the hu.dwim team changed their systems this way, at my suggestion.
> I am looking for a place from which to call load-connected-systems that will
> trigger its call as soon as it's able, i.e., immediately once both "B" and
> "C" are loaded. I'm not familiar with the internals of ASDF and wonder if
> someone can guide me to a good place to define this.
There is no such place. Even what asdf-system-connections is a bit of a stretch.
On @(ASDF3), you could try an after method on make-plan, or something like that,
but it will be quite ugly, and will confuse the hell out of the
methods that call
traverse-action directly, etc.
Frankly, the whole idea is bunk. A build system ought to be
predictable, reproducible, and minimize surprise.
asdf-system-connections, as it stands, is not great in this regards,
but at least does not disrupt the internal dependency model of ASDF;
it stands on top. Your proposed extension requires subverting basic
invariants of ASDF internals.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Many people escape old fairy tales (creationism, homeopathy, monarchy)
only to fall into new ones (democracy, socialism, global warmism)...
More information about the asdf-devel