Generate dependency graphs of fpm packages
To start using fpm-deps
run the commands:
git clone https://github.com/ivan-pi/fpm-deps && cd fpm-deps # clone project
fpm install --prefix $HOME/.local # install in a directory on the user PATH
fpm-deps # run fpm-deps in the root directory of an fpm project
The commands above will install the fpm-deps
executable into the $HOME/.local/bin
folder, assuming it is included in your shell's PATH
.
The result can be piped to the Graphviz dot
command, e.g.:
fpm-deps | dot -Tsvg -ofpmdeps.svg
resulting in
To generate a Mermaid dependency graph you can include in your Markdown documents (either Github- or Gitlab-flavoured markdown) use
fpm-deps --mermaid -o depgraph.mmd
Alternatively, you can output a standalone HTML page:
fpm-deps --mermaid html -o depgraph.html
The rendered output can be seen here.
For visualizing Fortran module dependency graphs, check out fpm-modules.
Similar projects for other programming languages:
Thanks to @vmagnin for early testing via the fpm plugin mechanism and for pointing me toward the existing cargo crates.
- browse option (see
browse
in ninja) - use style/colors to distinguish dependencies (local, git, registry)
- customize nodes with other package information
- offline mode (use only cached data)
- library dependencies (link-time)
- subgraph selection based on category/authors/...