www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - detectcycles: A source code dependency cycle checker

reply Vijay Nayar <madric gmail.com> writes:
https://github.com/vnayar/detectcycles

I made a small configurable tool to detect software source 
dependency cycles that is configurable to use for most languages. 
By default, C++, Java, and D are supported, but add new languages 
is as simple as adding a few lines to JSON configuation file.

I often work on very large software projects in various different 
languages, and sometimes you walk onto projects that were large 
long before you got there. Part of my work involves 
re-architecting and breaking apart monolithic code bases, and 
knowing which components have been tied together as a block is 
useful for a quick analysis and helps show me where I need to 
focus my attention.

Hopefully other people find it useful as well.
Jun 17
parent reply Mario =?UTF-8?B?S3LDtnBsaW4=?= <linkrope github.com> writes:
I did not mention it in the README, but the tred filter used in 
https://code.dlang.org/packages/depend complains about cyclic 
dependencies.

I am currently working on a branch, where the transitive 
reduction and the corresponding warnings are built in.

While this tool is for D only, it also allows to visualize and to 
check dependencies.
Jun 17
parent Vijay Nayar <madric gmail.com> writes:
On Sunday, 17 June 2018 at 20:20:48 UTC, Mario Kröplin wrote:
 I did not mention it in the README, but the tred filter used in 
 https://code.dlang.org/packages/depend complains about cyclic 
 dependencies.

 I am currently working on a branch, where the transitive 
 reduction and the corresponding warnings are built in.

 While this tool is for D only, it also allows to visualize and 
 to check dependencies.
Very nice project. The PlantUML output is a brilliant idea. In my case, I am mostly analyzing projects that are NOT in D, so I need a general purpose tool. I'm putting it through practical runs this morning and discovering areas of improvement. For example, in Java, one need not import dependencies within the same package, so I need to take a list of "uses" regex patterns instead of just having a single one, so that things like " Autowired" from Spring can be detected as well.
Jun 18