ml icon indicating copy to clipboard operation
ml copied to clipboard

Infer component groupings based on folder structure

Open naturallymitchell opened this issue 6 years ago • 4 comments

Would it be possible to organize the graph output structure like this visual paradigm - class diagram using the relationships encoded as a source code folder hierarchy? For example, this project's code seems organized well to fit that type of output.

naturallymitchell avatar Oct 17 '17 23:10 naturallymitchell

@mitchtbaum: There is a current limitation; the mll library has for dependency the dot crates who not implement the Subgraphs and Clusters described by the Graphviz's DOT language.

adjivas avatar Oct 18 '17 23:10 adjivas

@adjivas thanks for your reply and your work. I added an issue upstream, so hopefully it will hit someone's radar who can make it happen.

Hypothetically for now then, does this feature make sense as described? Would a component graph of this library come out better organized based on your existing coding style and folder structure?

naturallymitchell avatar Oct 19 '17 15:10 naturallymitchell

Well we can hypothetically envisage two features:

  • mod : where the subgraph is only a group of item with the name of the submodule.
  • mod-hierarchic : where we have a tree of subgraph imbricated

adjivas avatar Oct 19 '17 16:10 adjivas

I can sorta imagine what those would look like in relation to the diagram above, and they seem to cover it from two different angles. I believe it'd make a big difference since most auto-generated component diagrams make little use of an organization scheme and they end up looking barely usable, eg https://github.com/mitchtbaum/pelican-visualizations/blob/master/class_diagram-no_tests.png. Thanks again. Hopefully the next visual programmer will see this in action soon.

Aside: If there's any discussion about idiomatic folder schemes for Rust or structured programming in general, then perhaps these will inform eachother.

naturallymitchell avatar Oct 20 '17 04:10 naturallymitchell