Bill Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

October 2005
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
Sep  Nov

ASDF Dependency Graphs

Wednesday, October 12, 2005

Richard Newman has created a really cool little utility for outputting the ".dot" files used by GraphViz to generate Lisp library dependency graphs (for libraries that are defined using ASDF). You wind up with pretty diagrams like the following one for Edi Weitz's TBNL library:



Using it is too easy:

  1. Download GraphViz if you don't have it on your machine
  2. Download Richard's asdf-viz.lisp utility program
  3. Fire up your lisp, load asdf-viz.lisp and run the utility using something like the following:
    (asdf-viz::output-toplevel :tbnl :stream *standard-output* :process-files nil)
    If you didn't output to a file, you'll need to either save the resulting output to a file (the convention is for the file to have a ".dot" suffix) or pipe it into GraphViz
  4. Load the ".dot" file into GraphViz and enjoy!
It would be nice to have one of these diagrams on each CLiki and Lispwire page that documents a CL libarary in order to illustrate the prerequisites and dependencies.

Very cute!

emacs Copyright © 2005 by Bill Clementson