-
Notifications
You must be signed in to change notification settings - Fork 822
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
Adding graphviz support in dump #852
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic @jeffctown, thank you! 🎉 I'm not too familiar with graphviz, are there any attributes or settings you would suggest for showing what sort of dependency a node is? (carthage, target..ect)
Added tests
Updating README Adding Changelog entry
b16550d
to
80b210d
Compare
@yonaskolb - What a great question! This got me thinking, and I decided to update the style to be as close to a UML dependency diagram as possible. My hope is that by using a standard, the diagrams will be understandable by the broadest audience. Changes Since Last Review:
Updated TestProject Diagram: |
var graphVizName: String { | ||
switch self.type { | ||
case .bundle, .package, .sdk, .framework, .carthage: | ||
return "<<external>>\\n\(reference)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about including the name of the dependency type instead of external? Same as enum cases but strings
[carthage]
Alamofire
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated here, with a few tests.
18a8412
to
e32078d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! Thanks again @jeffctown! I think this will be really useful for many people
Hey there! 👋
Motivation
I came here looking for the same thing mentioned in #646: a way to output a dependency graph from
xcodegen
project filesWhats in this PR
I added support, like specified in the linked issue.
The following will output a Graphviz to stdout:
xcodegen dump --type graphviz
And this will output to a file:
xcodegen dump --type graphviz --file ~/Desktop/output.viz
When the output is pasted into an online graphviz tool it can produce a target dependency graph based on xcodegen project files.
This was created from the Test Fixture project in
Tests/Fixtures/TestProject/
:What Should We Discuss?
Well, I'm adding a dependency on a graphviz package. It is actively maintained.
Is this worth adding a dependency? 🤷♂️