Skip to content

Graphs dependencies in the asd files of Common Lisp systems.

Notifications You must be signed in to change notification settings

ioannad/asd-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASD-GRAPH

This small utility uses graphviz dot to visualise the dependencies declared in a Common Lisp <system-name>.asd file.

Requirements

  • Linux OS

  • Graphviz (dot should be in /usr/bin/dot)

  • A Common Lisp REPL (CCL or SBCL, tested)

  • Quicklisp

Usage

Load this file in a Common Lisp REPL (tested with CCL and SBCL), and if <file-name> is the path (including the path to the file) to the <system-name>.asd you would like to draw the graph of, then evaluate:

(asd-graph <file-name>)

optional keywords:

:output-dir <output-dir> and :format <fmt>

This will create a dot and an svg (or <fmt> if keyword :format was used) file in the same directory as <file-name>, or in <output-dir> if keyword :output-dir was used.

Example usage

(asd-graph "~/quicklisp/local-projects/jeffrey/jeffrey.asd")

(asd-graph "~/quicklisp/local-projects/jeffrey/jeffrey.asd" :format "pdf")

Formats supported by dot:

<fmt> can take one of the following values:

canon, dot, fig, gd, gif, hpgl, imap, cmap, mif, mp, pcl, pic, plain (ascii), png, ps, ps2, svg, vrml, vtx, wbmp.

According to the graphviz dot manual: http://www.graphviz.org/Documentation/dotguide.pdf

Supported .ASD syntax

For now, only the simplest .asd syntax is supported, e.g.:

(defsystem "hello-lisp"
  :description "hello-lisp: a sample Lisp system."
  :version "0.0.1"
  :author "Joe User <[email protected]>"
  :licence "Public Domain"
  :depends-on ("optima.ppcre" "command-line-arguments")
  :components ((:file "packages")
               (:file "macros" :depends-on ("packages"))
               (:file "hello" :depends-on ("macros"))))

This example is from the ASDF Manual

This utility visualises the part after :components.

Examples

About

Graphs dependencies in the asd files of Common Lisp systems.

Resources

Stars

Watchers

Forks

Packages

No packages published