Running odep dune | dot -Tsvg in the project’s own repository produces the following comprehensive graph. It shows modules in the project itself, clustered by dune libraries, and other findlib libraries, clustered by opam packages. This information is gathered and combined from dune describe workspace --with-deps, findlib and opam.
See README on GitHub for more usage examples.
Looks great! But is it tool-friendly? I could really use something like this to help convert dune files to Bazel files, but for that it would need to produce something that I can (easily) parse, like sexps. Can it do that? It would also be great if it were available as a library.
It simply uses dune describe workspace --with-deps to get information from a dune project. That already is sexp output, so you might as well parse it directly (like odep does) and use it however you need, as opposed to having odep provide a library-like abstraction layer on top of that.
Thanks! I hacked something quick when I had the same need (as a hacky branch on top of @mjambon’s dune-deps), but the output of your tool is much nicer, I will use it next time. Also, dune-deps appears to be unmaintained so it is good to have a replacement.