Skip to content

Dependency resolver is a tool that detects circular dependencies among C/C++ project files and visually represents them in a hierarchical graph.

License

Notifications You must be signed in to change notification settings

momadacoding/dependency-resolver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dependency resolver tool (DRT)

The dependency resolver tool consists of two main parts:

  • Dependency scanner - scans all dependencies among your C/C++ project files.
  • Graph visualizer - draws a hierarchical graph of the dependencies on the screen.

The scanner is used to obtain all includes from project files which are then used to form a directed cyclic or acyclic graph. Cycle (if present) is removed by reversing certain edges and topological order is computed at the same time. Graph with the altered state (in case of cycle presence) is passed to a node layering module that assigns nodes to different vertical layers and computes alternative traversal edges in case there are long edges by adding dummy vertices. Finally, graph and layering are passed to the graph visualizer where it is then rendered onto the screen.

The tool can be used to quickly find circular dependencies.

Install instructions

Requires: Python 3.7+

Step 1

Open a terminal and navigate to where you extracted the DRT.

Example: cd "G:\dependency-resolver-master\"

Step 2

Run pip install -r requirements.txt

Step 3

Run py main.py

How to use

Click on the Select button to select a directory containing C/C++ project files. The dependency scanner will get all the includes from files and create a hierarchical representation of project dependencies. Warnings will show in the bottom-left corner in case a cyclic dependency was detected. Besides, at least one of the edges that are in the cycle will be highlighted.

Background

DRT is a small proof-of-concept tool developed for a semester project to show how the toposort algorithm could be practically used.

Demo

Project showcase

References

Websites:

About

Dependency resolver is a tool that detects circular dependencies among C/C++ project files and visually represents them in a hierarchical graph.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 82.0%
  • C++ 17.8%
  • Batchfile 0.2%