Skip to content

[Build] Free BuildPlan from BuildTriple #7877

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 5 commits into from
Aug 14, 2024

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Aug 13, 2024

Motivation:

This is yet another step (if not the last one) on the path to remove
buildTriple from Resolved{Product, Module} identifiers and switch
everything that requires destination to use information from the build
plan.

Modifications:

  • Makes build descriptions identifiable just like Resolved{Product, Module}.ID
  • Adds a way to traverse module (both direct and recursive) dependencies starting from a module build description.
  • Switches BuildPlan.{target, product}Map to IdentifiableSet<{Product, Module}BuildDescription.

Result:

BuildTriple is no longer used for build related operations such as planning and forming llbuild manifests.

@xedin
Copy link
Contributor Author

xedin commented Aug 13, 2024

@swift-ci please test

@xedin xedin changed the title [Build] Free BuildPlan from BuildTriple. [Build] Free BuildPlan from BuildTriple Aug 13, 2024
@xedin
Copy link
Contributor Author

xedin commented Aug 14, 2024

These changes led me to discover #7879

@xedin xedin force-pushed the no-more-buildTriple-use-in-build-plan branch from 2940bae to 41a559a Compare August 14, 2024 00:00
@xedin
Copy link
Contributor Author

xedin commented Aug 14, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Aug 14, 2024

@swift-ci please test Windows platform

1 similar comment
@xedin
Copy link
Contributor Author

xedin commented Aug 14, 2024

@swift-ci please test Windows platform

@xedin
Copy link
Contributor Author

xedin commented Aug 14, 2024

@swift-ci please test

xedin added 5 commits August 14, 2024 09:16
This method is going to be very useful for planning various
build descriptions because they currently rely on a modules
graph + description lookup into the build plan which is not
great because it means that modules graph has to know about
module destinations.
…odule build description

BuildPlan adjacent things should use this instead of reaching for
a module graph and lookup up descriptions.
…ons for build plan

Instead of using `Resolved{Product, Module}.ID` to storage module
and product collections in the build plan, switch to use newly added
`Identifiable` conformation on `{Product, Module}BuildDescription`.

This is yet another step (if not the last one) on the path to remove
`buildTriple` from `Resolved{Product, Module}` identifiers.
@xedin xedin force-pushed the no-more-buildTriple-use-in-build-plan branch from 41a559a to 56f3c85 Compare August 14, 2024 16:18
@xedin
Copy link
Contributor Author

xedin commented Aug 14, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Aug 14, 2024

@swift-ci please test Windows platform

@xedin xedin merged commit 0c1bed8 into swiftlang:main Aug 14, 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.

3 participants