-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[BuildPlan] Add a way to traverse the graph and compute destinations for all modules #7868
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
Conversation
swiftlang/sourcekit-lsp#1621 |
swiftlang/sourcekit-lsp#1621 |
1 similar comment
swiftlang/sourcekit-lsp#1621 |
ed2e021
to
e3b64f9
Compare
swiftlang/sourcekit-lsp#1621 |
swiftlang/sourcekit-lsp#1621 |
swiftlang/sourcekit-lsp#1621 |
1 similar comment
swiftlang/sourcekit-lsp#1621 |
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.
LGTM, only coding style, typo, and test organization nits.
…for all modules This is going to be used by sourcekit-lsp to build a graph/dictionary of all the targets and depths they appear during package loading and replaces the need for topological sort and `buildTriple`.
e3b64f9
to
1b352ac
Compare
swiftlang/sourcekit-lsp#1621 |
swiftlang/sourcekit-lsp#1621 |
Motivation:
This is going to be used by sourcekit-lsp to build a graph/dictionary
of all the targets and depths they appear during package loading and
replaces the need for topological sort and
buildTriple
.Modifications:
depthFirstSearch
variant which traverses all of the nodes in the graph.BuildPlan
-traverseModules
which goes over the graph, computes destinations and returns modules with their parents and depths they appear at (the method looks though products).Result:
This make it possible to switch sourcekit-lsp away from using topological sort and relying on
buildTriple
.Paired with swiftlang/sourcekit-lsp#1621