module_dependency_visualizer
module_dependency_visualizer copied to clipboard
Visualize the dependencies between modules in your Elixir applications
ModuleDependencyVisualizer
What is this?
I needed a way to generate a graph of module dependencies for Elixir applications for an upcoming talk I'm giving. This tool generates that structured data for me so I can investigate and make pretty graphs!
A module dependency, for this purpose, is any module that is include
d, use
d,
or has a function called. You can check out the tests for a brief example that
should clear things up.
Can/Should I use this?
Sure, why not! It's a very narrow library that I'm mostly have as open sourced so the code is available for inspection by people who see the talk I'm giving that will feature the data generated by this tool.
How can I use this?
If you really want to check out the dependency graph for your Elixir
application, go ahead and clone this repo. Then, in run.exs
you can insert
the path to whatever files you want to analyze in the string there. Then run the
app using mix run run.exs
. You'll want to have Graphviz already installed on
your machine if you want to see the pretty graph.
If you want to do really deep analysis of your graphs, you can use
Gephi. The .gv
files output by this program can easily
be loaded into that program.
Also, I've only tested this on OSX, so Linux and Windows may have some funkiness.
Is it any good?
No, it most certainly is not. Tests are sparse, documentation is lacking, and the code itself has a ton of duplication. It is, however, a working application without any dependencies.
Will it be developed further?
No, it will not. If you're interested in developing this, feel free to fork this and take it in whichever direction you see fit! This fits my needs for now, and at the moment I'm too busy to commit to maintaining it.