cargo-modules icon indicating copy to clipboard operation
cargo-modules copied to clipboard

Visualization of multiple packages

Open valkrypton opened this issue 1 year ago • 1 comments

I have a workspace with multiple packages and I want to visualize if there's any inter-dependency between them. Is that possible?

valkrypton avatar Oct 08 '24 12:10 valkrypton

Hi @valkrypton, it isn't supported as a feature.

That said, while I haven't tried it myself yet, one should be able to manually merge the produced .dot file output of two (or more) runs in a text editor.

The output should look something like this:

digraph {

    graph [
        // graph attributes ...
    ];

    node [
        // node attributes ...
    ];
 
    edge [
        // edge attributes ...
    ];

    // nodes ...

    // edges ...
}

What you would have to do is open the output of your two runs in an editor for each and then copy the // nodes ... section of one file and append it to the same section of the other file. Then do the same for // edges ....

I'm not sure from the top of my head how graphviz handles duplicate nodes/edges, so might have to run the merged // nodes ... and // edges ... sections through sort -f | uniq to eliminate any redundant nodes/edges.

regexident avatar Oct 15 '24 09:10 regexident