A modest proposition: DEFSYSTEM-DEPENDS-ON should die [was Re: What's the right way to extend ASDF with new symbols?]

Faré fahree at gmail.com
Mon Feb 15 20:54:06 UTC 2016


For some historical perspective, defsystem-depends-on was added at a
time when we wanted a more declarative solution than using load-system
in a .asd file, and wasn't initially thought through. It took over a
year for it to become an actually useful feature, after realizing the
package issue and allowing and recommending the use of symbols in the
asdf and/or keyword packages as a workaround.

At the time, the dependency graph of ASDF wasn't understood by anyone,
and indeed was broken, and there was no hope of ever turning a
load-system into a dependency. Now, the dependency graph is understood
and fixed, and there's a way to handle such dependencies right,
whether through load-system or through defsystem-depends-on — but it
requires a new maintainer to do some non-trivial re-coding of load-asd
and/or parse-defsystem. That would mean a major release of ASDF 3.2
and/or ASDF 4 as a result. Basically, you'll need to (a) add new
dependency nodes for loading an asd file, (b) properly handle
recursive calls to operate from find-system and/or make-plan, and (c)
use special variables to track context and maintain dependency graph
in presence of such calls.

Will anyone do it? Neither Robert nor I has the will to do it, though
I will gladly consult with whoever does it (if he cares from my
opinions).

Once this capability is added to ASDF, the rationale for
defsystem-depends-on vanishes: just use load-system or load-systems
from a .asd file. You may still want to restrict .asd file to a short
whitelist of allowed forms to keep it "declarative".

As for what Quicklisp needs, I suppose it is a way to reliably find
*all* the transitive dependencies of a system, if possible without
loading it, though perhaps after loading its defsystem-depends-on
dependencies, which might be required in the general case. Right now,
the best you can do is load into an empty image, and inspect all
that's loaded afterwards.

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Constitution, article 1: any person who claims that a document called
"constitution" possesses any authority whatsoever on other people is an
impostor guilty of high treason and liable to immediate capital punishment.



More information about the asdf-devel mailing list