Skip to content

PrebuiltModuleGen: teach the tool to dump a .dot file for module dependency visualization #709

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 1 commit into from
Jun 11, 2021

Conversation

nkcsgexi
Copy link
Contributor

No description provided.

@nkcsgexi nkcsgexi requested a review from artemcm June 10, 2021 23:43
@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@artemcm artemcm left a comment

Choose a reason for hiding this comment

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

Very nice!
We have something similar in SwiftPM:
https://github.com/apple/swift-package-manager/blob/main/Sources/LLBuildManifest/DOTManifestSerializer.swift

But this will be super useful also.
My only comment is that this looks like it'd be handy for general debugging with explicit module builds so perhaps we can make the dot-emission routine more accessible?

@@ -283,14 +283,68 @@ extension Driver {
)
}


func dumpDotGraph(_ graph: InterModuleDependencyGraph, _ path: AbsolutePath, _ includingPCM: Bool) throws {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make this an InterModuleDependencyGraph extension so that other uses can potentially do the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, will refactor that

@nkcsgexi nkcsgexi force-pushed the prebuilt-dump-dependencies branch from 1009e66 to 7da6a5e Compare June 11, 2021 00:00
@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

@nkcsgexi nkcsgexi merged commit 04fceed into swiftlang:main Jun 11, 2021
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.

2 participants