[asdf-devel] Ordering of system :depends-on elements

Robert Goldman rpgoldman at sift.info
Sun Jul 7 22:36:58 UTC 2013


Zach Beane wrote:
> A few projects in quicklisp work something like this:
>
>    ;;; foo.asd
>
>    (defsystem foo ...)
>
>    (defsystem foo-extra ...)
>
>
>    ;;; bar.asd
>
>    (defsystem bar :depends-on (:foo-extra :foo))
>
> With asdf 2, (asdf:load-system "bar") seems to work fine, I guess
> because asdf 2 does the equivalent of find-system on the elements from
> right-to-left.
>
> With asdf 3, it doesn't seem to work fine, I guess because asdf 3 does
> the equivalent of find-system on the elements from left-to-right.
>
> Are those guesses correct?
>
> What's the best way to have a system definition that works equally well
> in asdf2 and asdf3 in this kind of situation?


I feel like I'm missing something.  Is there some reason you can't simply make 

(defsystem foo-extra :depends-on (:foo)
  ....)

?

ASDF's process for constructing a build plan from partial-order dependencies is (unless Faré changed something when I wasn't looking) non-deterministic.

If you want it to be deterministic, you should add dependencies sufficient to force build order.

Even if you *could* get the behavior you wanted out of left-to-right ordering in the :depends-on slot, this isn't something you should rely upon.

Best,
r




More information about the asdf-devel mailing list