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

yard graph vs rubrowser #2

Closed
arbox opened this issue Apr 11, 2017 · 2 comments
Closed

yard graph vs rubrowser #2

arbox opened this issue Apr 11, 2017 · 2 comments

Comments

@arbox
Copy link

arbox commented Apr 11, 2017

Hi!
Thanks for the nice project!
Look at yard graph for additional inspiration, it's a pretty standard tool for class diagram and dependency visualizations for Ruby projects.

@emad-elsaid
Copy link
Owner

I tried it now, the diagram looks interesting, I would like to take the additional parsing information from Yard like attributes/methods for the "details" panel in rubrowser
YARD would be a complete backend and rubrowser is a frontend if it was parsing the classes dependencies not just the inheritance/composition, as from what I see now, if a class is using another class or module it doesn't display it (unless it's included or extended).
am I missing some command flag?
I used this command to generate the graph for one of my projects

yard doc
yard graph --dependencies --empty-mixins --full | dot -T pdf -o diagram.pdf

and the resulting graph was as such
diagram.pdf

@arbox
Copy link
Author

arbox commented Apr 12, 2017

You are right, Yard wouldn't say you if a class instance is created or called somewhere else in the code. But you cannot collect such information statically in an easy way since objects can by passed dynamically as arguments, types can be casted and so on...

Three ways so are possible:

  • sophisticated static analysis;
  • dynamic runtime analysis;
  • type annotations.

It's definitely not so easy as for the first glance :) But please keep trying!

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

2 participants