Skip to content
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

Project state #7

Open
bitdivine opened this issue Jun 5, 2019 · 7 comments
Open

Project state #7

bitdivine opened this issue Jun 5, 2019 · 7 comments

Comments

@bitdivine
Copy link

Hello,

This project looks interesting; may I ask about the current state of the project in terms of maintenance and so on? If there is interest in maintaining this as a tool for generating UML from Rust crates and the goals are reasonably close to my own I would be interested in contributing. If on the other hand you know that e.g. some of the dependencies are unmaintained and this would be a huge amount of work then a clean slate approach might be better.

Best wishes, Max

@adjivas
Copy link
Owner

adjivas commented Jun 6, 2019

Hello @bitdivine,

Only the dot dependency looks like unmaintained and limited. Is it a pure Rust solution than a FFI of graphviz but there miss the subgraphs keyword and without it my ml library can't groups the class into module. Unfortunately, I never had the resources of time for solve this problem.

If is it a important graphviz functionality to you and that you prefer the solution of a FFI, I recommend to you of write it from zero.

Any contribution are welcome and you also can become member of this repository.

@adjivas.

@bitdivine
Copy link
Author

bitdivine commented Jun 6, 2019

Hello @adjivas ,

Thank you for getting back to me. My goal is to be able to visualise almost any rust crate. I see two challenges:

  • Scaling a project up so that it runs on all sorts of inputs usually turns up corner cases, so I expect some target crates to work fine out of the box, others to require development work. For this I would start by picking a handful of rust crates, make them development dependencies and test some statements about the output. Update: I see that main gets compiled into a command line version of the tool. This should be helpful for making the testing easier.

  • Large graphs can become hard to understand. I have previously dealt with this problem by using Cytoscape to render graphs in a browser and providing the user with tools so that they can filter the graph to show just the parts of interest. In this way, users can also manually adjust the layout if this is helpful. For this reason I would want to add more output options or perhaps make a separate project that parses UML and displays it in a browser using Cytoscape, so that users can filter and adjust the graph. This might be a better approach as that way this project here can be fully focussed on UML and not worry about how it is displayed.

If this sounds compatible with your vision I would be very happy to collaborate. Thank you for your kind invitation.

Best wishes, Max

@bitdivine
Copy link
Author

bitdivine commented Jun 6, 2019

I have started testing crates using the command line version of your tool, just on crates in my home dir. Works on most, on some I have "error: expected identifier, found keyword crate" for "use crate::....". I can assemble a set of crates, make sure that they are up to date and put them into some sort of test rig.

@bitdivine
Copy link
Author

Update: If I replace every instance use crate:: with use something:: in every file then parsing works for the handful of top and most recent crates on crates.io that I picked. This is promising. I suspect that the preprocessor needs to be understood more thoroughly than I do at the moment; unfortunately understanding it well may be hard work.

Regarding the output, it would be interesting to me to make component diagrams as well as the current diagrams that show inclusion. For this traits would be interfaces and structs would either supply that interface or consume it. The interface ID would have to be the tuple of (struct,trait), as the same interface might be supplied by several structs.

@adjivas
Copy link
Owner

adjivas commented Jun 6, 2019

Scaling a project up so that it runs on all sorts of inputs usually turns up corner cases, so I expect some target crates to work fine out of the box, others to require development work. 

The dependency syntex_syntax is the parser of the Rust compiler soo the ml crate is a UML subview of syntex_syntax. But your test will be welcome because I have never checked the rebusted of this project.

For this reason I would want to add more output options or perhaps make a separate project that parses UML and displays it in a browser using Cytoscape, so that users can filter and adjust the graph. This might be a better approach as that way this project here can be fully focussed on UML and not worry about how it is displayed.

This project currently has a minimalist language of graph named DOT according to the recommendation of this paper. Do you think graphviz Dot display should be separed of ml crate? Maybe the Dot language is compilable into Cytoscape?
This topic say a Dot language is compilable into a GRAPHML language who is importable by Cytoscape. So I imagine a IC script can solve this question without need to write a implemente of Cytoscape.

@arnfaldur
Copy link

It seems like the syntex_syntax crate is abandoned. This crate does not work for me either and I suspect that syntex is the cause.

@adjivas
Copy link
Owner

adjivas commented May 31, 2021

Thanks for reporting @arnfaldur !
It's really annoying because my time resources are really thin.
I will consider the rustc-ap-syntax's crate or another.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants