Skip to content

[BuildPlan] Switch build plan construction to use graph traversal #7854

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
Aug 5, 2024

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Aug 2, 2024

Motivation:

This way we can compute destinations as we go instead of relying on buildTriple computed during graph construction.

Modifications:

  • Adds a new static method on BuildPlan to traverse modules graph and compute destinations for each product and module.
  • Switches BuildPlan.init from using allProducts and allModules flat lists over the new incremental destination computation.

Result:

Removes one of the last places were buildTriple is required.

This way we can compute destinations as we go instead of relying
on `buildTriple` computed during graph construction.
@xedin
Copy link
Contributor Author

xedin commented Aug 2, 2024

Next up we need to switch productMap and targetMap in BuildPlan to use IdentifiableSet and remove use of ResolvedModule.ID cannot do that without some sourcekit-lsp changes first.

@xedin
Copy link
Contributor Author

xedin commented Aug 2, 2024

@swift-ci please test

Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

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

Thank you! 🙏

@xedin xedin merged commit a23ca93 into swiftlang:main Aug 5, 2024
5 checks passed
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