adjivas / ml

A library to generating UML language from Rust's project into graphiz/dot file.
https://adjivas.github.io/ml/mml
Apache License 2.0
79 stars 15 forks source link

Infer component groupings based on folder structure #3

Open naturallymitchell opened 6 years ago

naturallymitchell commented 6 years ago

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.

adjivas commented 6 years ago

@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.

naturallymitchell commented 6 years ago

@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?

adjivas commented 6 years ago

Well we can hypothetically envisage two features:

naturallymitchell commented 6 years ago

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.