[asdf-devel] Fixing asdf-sytem-connections

Robert Goldman rpgoldman at sift.net
Sun Mar 9 16:46:25 UTC 2014

Liam Healy wrote:
> Well, I think it has some use, though now in the Quicklisp era it's less
> important, and that is to define an optional dependency for something
> that's incidental to the main system. For example, one of my projects
> (Antik) defines units as part of a large system for doing
> science/engineering math. As a convenience, it will  use the degree
> symbol. In order to get the degree symbol, I use cl-unicode. This is an
> incidental use of one (big) system for the occasional (cosmetic)
> augmentation of another. Most people will not care about units at all,
> and so loading cl-unicode grows the system mostly unnecessarily, and
> adding a new user-visible system definition complicates users' mindspace
> for a mostly unused benefit (and imagine you have 3 optional definitions
> like this - then you would need to define 7 new systems to capture each
> combination). The alternative is to give up on the degree symbol, but it
> is nice to have it when you use degrees, and easy (one line of source
> code) to add if cl-unicode is present.

Wouldn't it be sufficient to:

1.  Weakly depend upon the cl-unicode system.  This will load the
cl-unicode system if available, but ignore it (instead of failing the
load) if cl-unicode is not present.

2.  Detect the successful load or failure downstream in a file-component
that adds the degree symbol.  Something like

(:component "turn-on-unicode-symbols" :if-feature :cl-unicode)

I note that this conflicts with Faré's advice in the current manual,
which is to use asdf-system-connections *in place of* weakly-depends-on.
 I am removing that advice, given that A-S-C is deprecated.

Question for Faré: you say that weakly-depends-on is not deterministic,
and that it's effects depend on load order.  Off-hand, I don't see this.
 If I have a system A that weakly-depends-on B, and then a component, as
above, that uses if-feature, where does the order-dependence arise?
Indeed, w-d-o seems more deterministic than A-S-C, because the latter
tries to load if B is already loaded -- and NOT try to load B if it's
not there.  That means that A-S-C is more procedural (depending on
global state) and less declarative than W-D-O, not less.

Or I'm missing something about the semantics.


Robert P. Goldman
Staff Scientist
Smart Information Flow Technologies (d/b/a SIFT, LLC)

319 1st Ave N., Suite 400
Minneapolis, MN 55401

Voice:    (612) 326-3934
Email:    rpgoldman at SIFT.net

More information about the asdf-devel mailing list