Skip to content

Add an option to output a dot graph of the build manifest. #2803

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

Merged
merged 2 commits into from
Jul 7, 2020

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Jul 6, 2020

Similarly to how swift-driver can serialize Jobs for a given compilation target, add a capability to write out the entire build manifest as a dot graph.
This was extremely useful for debugging various build issues.

@artemcm artemcm requested a review from aciidgh July 6, 2020 15:54
Copy link
Contributor

@aciidgh aciidgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@artemcm
Copy link
Contributor Author

artemcm commented Jul 6, 2020

@swift-ci please test

@artemcm
Copy link
Contributor Author

artemcm commented Jul 6, 2020

@swift-ci smoke test

Copy link
Contributor

@abertelrud abertelrud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Just a suggestion that when appropriate, when adding debugging support like this, it would be great to do it in a way that could also be enabled from IDEs such as Xcode (e.g. by being able to write to a general file or stream and not just stdout, etc).

@@ -103,6 +103,9 @@ public class ToolOptions {
/// Whether to use the explicit module build flow (with the integrated driver)
public var useExplicitModuleBuild: Bool = false

/// Whether to output a graphviz file visualization of the combined job graph for all targets
public var printManifestGraphviz: Bool = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if this were phrased as the stream to which to write the GraphViz representation, rather than always writing it to stdout. That way we could enable it from IDEs such as Xcode, where emitting to stdout isn't always the right thing. This could be done as a follow-on PR.

@artemcm
Copy link
Contributor Author

artemcm commented Jul 6, 2020

@swift-ci smoke test

@artemcm artemcm merged commit 3b56acc into swiftlang:master Jul 7, 2020
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

Successfully merging this pull request may close these issues.

3 participants