Package Dependency Graph Visualization
pkg-dep-draw
7.1

Package Dependency Graph Visualization

The pkg-dep-draw module provides a pkg-dep-draw function for drawing a package-dependency graph, and it also supports command-line options when run as a program.

To run from the command line, use

  racket -l- pkg-dep-draw option* root-pkg*

which shows packages reachable from the root-pkgs (or all packages if no root-pkgs are specified). The visualization shows packages that are either installed or available from the catalogs/directories specified by --catalog/--dir options. By default, the graph is shown in a GUI window, but use the -o flag to direct the output to a PNG or PDF file.

Packages are sorted in the visualization so that a package’s dependencies appear below it or at the same vertical layer (in the case that packages are mutually dependent). Build dependencies are shown with purple lines, while run-time dependencies are shown with blue lines. A blue or purple square connects packages that are mutually dependent, depending on whether they have a mutual run-time dependence (blue square) or merely a mutual build-time dependence (purple square). In GUI mode, click on a package name to pin its dependency lines (and click in an empty area to unpin lines).

As a program, pkg-dep-draw accepts the following command-line options:

procedure

(pkg-dep-draw [#:root-pkgs root-pkgs    
  #:select-pkgs select-pkgs    
  #:srcs srcs    
  #:no-build? no-build?    
  #:no-build-lines? no-build-lines?    
  #:no-trans-lines? no-trans-lines?    
  #:invert? invert?    
  #:quiet quiet?    
  #:dest-file dest-file    
  #:dest-format dest-format    
  #:scale scale])  void?
  root-pkgs : (listof string?) = null
  select-pkgs : (listof string?) = null
  srcs : (listof (cons/c (or/c 'dir 'catalog) string?)) = null
  no-build? : any/c = #f
  no-build-lines? : any/c = #f
  no-trans-lines? : any/c = #f
  invert? : any/c = #f
  quiet? : any/c = #t
  dest-file : (or/c #f path-string?) = #f
  dest-format : (or/c 'png 'pdf) = #f
  scale : real? = 1
Draws a dependency graph the same as running pkg-dep-draw as a program with command-line arguments (with hopefully obvious representations and treatments of the arguments).