Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.83 KB

README.md

File metadata and controls

52 lines (34 loc) · 1.83 KB

ddepstographviz

Build Status

ddepstographviz takes the dmd output of the -deps flag and produces a file that the graphviz package (use fdp) can turn into a pretty, colorful picture of your app's dependencies.

Pointing the mouse on the * on the edges displays what symbols are imported. package means that no selective imports where used.

Usage

  1. Get dmd deps file -deps="deps.txt"

  2. Run ddepstographviz on it

$ dub run ddepstographviz -- -i deps.txt -o deps.dot
  1. Run graphviz (fdp) on it
$ fdp deps.dot -T (svg,png,jpg) > deps.(svg,png,jpg)

Example

We use the test of graphqld as an example.

  1. Displaying all the deps, is normally way to much to see anything.

Image of all deps

  1. We can exclude package by use of the -e options
$ dub run ddepstographviz -- -i deps.txt -o deps.dot -e std,vibe,mir,nullablestore,core,object,diet,taggedalgebraic,taggedunion,eventcore,fixedsizearray

Image of all deps without libs

  1. The graph is still to messy.

So we remove edges between module in the same package, and dependencies that point down in the module tree.

$ dub run ddepstographviz -- -i deps.txt -o deps.dot -e std,vibe,mir,nullablestore,core,object,diet,taggedalgebraic,taggedunion,eventcore,fixedsizearray -t true -d true

Image of all deps without libs and less internal edges