Skip to content
forked from mjambon/dune-deps

Show the internal dependencies in your OCaml/Reason/Dune project

License

Notifications You must be signed in to change notification settings

xclerc/dune-deps

 
 

Repository files navigation

dune-deps CircleCI badge

Show the internal dependencies in your OCaml/Reason/Dune project.

Input: the root folder of your project

Output: a graph in the dot format

Example:

$ dune-deps | tred > deps.dot
$ dot -Tpng deps.dot -o deps.png

Running dune-deps on itself gives us this dependency graph:

graph for dune-deps itself

This is the graph we obtain for the source code of opam, an elaborate project of over 50K lines of code:

graph obtained for the opam project

Installation

From opam:

$ opam update
$ opam install dune-deps

From the git repo:

$ make
$ make test
$ make install

Rendering the graph

For producing a 2D image of the graph, we rely on the dot command from Graphviz.

Additionally, it is often desirable to remove excessive edges to make the graph more readable. We consider "excessive" an edge that can be removed without changing the reachability from a node to another. This transformation is called transitive reduction and is performed by tred, normally installed as part of the Graphviz suite.

Project status

Dune-deps was initiated by Martin Jambon. It is distributed free of charge under the terms of a BSD license.

Software maintenance takes time, skill, and effort. Please contribute to open-source projects to the best of your ability. Talk to your employer about it today.

About

Show the internal dependencies in your OCaml/Reason/Dune project

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • OCaml 85.1%
  • Makefile 9.5%
  • Shell 5.4%