[asdf-devel] Small ASDF extension to show dependency DAG

Faré fahree at gmail.com
Sat Jul 9 20:01:05 UTC 2011


On 9 July 2011 15:48, Scott L. Burson <Scott at ergy.com> wrote:
> Hi Faré!
>
> Here's a little hack I just wrote because I wanted to see the
> dependency DAG for a system I'm working on:
>
> (in-package :asdf)
>
> (defun* show-dependencies (system-name &key descriptions?)
>  (let ((seen (make-hash-table :test #'equal)))
>    (labels ((rec (system-name depth)
>               (let ((nm (if (and (listp system-name) (eq (car system-name) ':version))
>                             (coerce-name (cadr system-name))
>                           (coerce-name system-name))))
>                 (if (gethash nm seen)
>                     (format t "~v at T[~A]~%" (* depth 2) nm)
>                   (progn
>                     (let ((sys (cdr (gethash nm *defined-systems*))))
>                       (if (null sys)
>                           (format t "~v at T~A??~%" (* depth 2) nm)
>                         (progn
>                           (format t "~v at T~A~@[: ~A~]~%" (* depth 2) nm
>                                   (and descriptions?
>                                        (slot-boundp sys 'description)
>                                        (slot-value sys 'description)))
>                           (setf (gethash nm seen) t)
>                           (dolist (dep (component-load-dependencies sys))
>                             (rec dep (1+ depth)))))))))))
>      (rec system-name 0))))
>
> I thought you might want to include this in asdf.lisp.  Sample output
> is below.  When a name is in brackets, that means the system and its
> dependencies have already appeared earlier in the listing.
>
(Adding asdf-devel as destination.)

It is cool. I think it deserves to be published.
But I don't think the already way too big asdf.lisp is the right place.
Our goal is to keep asdf.lisp itself minimal, and move anything not
strictly needed for system bootstrap into extensions.
At the same time, we don't yet have an "official" repository for such
extensions.
Maybe it's time to start one.
Any taker?

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org



> -- Scott
>
> osb
>  clsql
>  clsql-postgresql
>    [clsql]
>    clsql-uffi
>      [clsql]
>      uffi
>  clsql-postgresql-socket
>    [clsql]
>    md5
>    [uffi]
>    sb-bsd-sockets
>      sb-grovel
>  weblocks
>    closer-mop
>    hunchentoot
>      chunga
>        trivial-gray-streams
>      cl-base64
>      cl-fad
>        sb-posix
>          [sb-grovel]
>      cl-ppcre
>      flexi-streams
>        [trivial-gray-streams]
>      cl+ssl
>        cffi
>          alexandria
>          trivial-features
>          babel
>            [trivial-features]
>            [alexandria]
>        [trivial-gray-streams]
>        [flexi-streams]
>        [sb-posix]
>      [md5]
>      rfc2388
>      trivial-backtrace
>      usocket
>        [sb-bsd-sockets]
>      bordeaux-threads
>        [alexandria]
>    puri
>    cl-json
>    cl-who
>    parenscript
>      [cl-ppcre]
>      anaphora
>    [cl-fad]
>    fare-matcher
>      fare-utils
>    cl-cont
>      [closer-mop]
>      [alexandria]
>    metatilities
>      metatilities-base
>      moptilities
>        [closer-mop]
>      cl-containers
>        [metatilities-base]
>      metabang-bind
>      asdf-system-connections
>    [cl-ppcre]
>    [md5]
>    [anaphora]
>    f-underscore
>    [bordeaux-threads]
>    salza2
>    html-template
>    trivial-timeout
>    [trivial-backtrace]
>  weblocks-clsql
>    [closer-mop]
>    [metatilities]
>    [clsql]
>    [weblocks]
>  cl-oauth
>    ironclad
>      sb-rotate-byte
>    [cl-base64]
>    [babel]
>    [closer-mop]
>    [alexandria]
>    [anaphora]
>    [f-underscore]
>    split-sequence
>    trivial-garbage
>    fiveam
>      arnesi
>    drakma
>      [puri]
>      [cl-base64]
>      [chunga]
>      [flexi-streams]
>      [usocket]
>      [cl+ssl]
>    [puri]
>    [hunchentoot]
>  [cl-ppcre]
>  cl-smtp
>    [usocket]
>    [trivial-gray-streams]
>    [flexi-streams]
>    [cl-base64]
>    [cl+ssl]
>  monkeylib-bcrypt
>    [cffi]
>  fset
>    gmap
>


More information about the asdf-devel mailing list