-
Notifications
You must be signed in to change notification settings - Fork 742
Add --emit-ir-graphviz=output.dot
to dump a graphviz dot file
#484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@impowski, maybe you're interested in hacking on this? |
For posterity, I used this command to go from a dot file to a png:
|
This would be quite awesome actually, thanks for thinking about this @fitzgen! |
Also this would be an easy way to diagnose which of the perf optimizations I mentioned in #59 would be more beneficial. |
Looking at the |
Wow. It's might be interesting. I guess I'll take it, because I've never done something like this. |
We could also feature-gate it, I guess. |
That's awesome! I'll mark it as assigned then :) |
@impowski Great! Let me know if you need any more pointers or if you run into unexpected roadblocks :) I very much look forward to having such a feature when debugging!! :-D
I think the |
This was fixed in #508 |
Shouldn't be too hard, and I often wish I had this when trying to debug anything involving resolved type references and the like.
There is a crate: https://github.com/GrahamDennis/dot-rust
Here is an intro to dot: http://graphviz.org/pdf/dotguide.pdf
If we didn't want to bring in an extra dependency, it shouldn't be hard to just write text to a file manually.
We would dump each item's attributes as an HTML table in the label for the item, and use
TypeCollector
to draw edges between items.Here is a sketch on what an implementation might look like:
Output should look something like this (we can add more table rows incrementally):
Which produces an image like this:
The text was updated successfully, but these errors were encountered: