Page 1 of 1

Love's Dependency Graph

Posted: Thu Jul 11, 2019 3:13 pm
by Tanner
I wanted to know where the module breaks (AKA where one of the "modules" pulls in part of another one) in Love's codebase were so I've generated a dependency graph for each of it's source files.

I used clang's `dependency-dot` flag to create the basic data. Accomplished by adding roughly this to the cmake config.

Code: Select all

foreach(SRC ${LOVE_LIB_SRC})
	set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS "-Xclang -dependency-dot -Xclang ${SRC}.dot")
endforeach()
Then gave it a quick pass to clean out the system dependencies and convert the dot files to SVG.

Not sure who could possibly care about this besides me but here it is. I've attached a zip file with the folder structure/cleaned dot files and the svgs. Also some html files that make viewing the graphs easier.

Also here's a little preview of a pretty complex one: wrap_Graphics.cpp.

Image

Edit: An extra little bonus: dependency graph between Love's "modules". Although take this with a grain of salt cause it's the end of the day and I haven't seriously validated it yet.
Image