Skip to content
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

[Multiplatform] Migrate ProjectDescription.Target to support multiple platforms #5595

Merged
merged 63 commits into from
Nov 28, 2023

Conversation

waltflanagan
Copy link
Member

@waltflanagan waltflanagan commented Nov 20, 2023

Very first exposure of multiplatform work in ProjectDescription. All feedback on API design welcome.

Addresses #5515

Short description 📝

Complete adding support for multiple platform targets in Tuist by exposing the API in ProjectDescription.Target

In order to minimize disruption and maintain source compatibility, we will deprecate the single platform init in preference of init(destinations:deploymentTargets:). We expose an analog of Platform and DeploymentTarget for source compatibility but they should no longer be relied upon.

To support multiplatform targets, we also migrate SPM dependencies via Dependencies.swift to use multiplatform targets instead of the single platform Framework_ios patterns.

When generating the resulting xcodeproj, platform filters are applied to PBXBuildFile instances via LinkGenerator

How to test the changes locally 🧐

Run tests. All should pass.

Contributor checklist ✅

  • The code has been linted using run make workspace/lint-fix
  • The change is tested via unit testing or acceptance testing, or both
  • The title of the PR is formulated in a way that is usable as a changelog entry
  • In case the PR introduces changes that affect users, the documentation has been updated

Reviewer checklist ✅

  • The code architecture and patterns are consistent with the rest of the codebase
  • Reviewer has checked that, if needed, the PR includes the label changelog:added, changelog:fixed, or changelog:changed, and the title is usable as a changelog entry

@waltflanagan waltflanagan changed the base branch from main to multi-platform/GraphEdges November 20, 2023 20:53
@waltflanagan waltflanagan changed the title multi platform/FinalInterface Multiplatform - Migrate ProjectDescription.Target to support multiple platforms Nov 21, 2023
@waltflanagan waltflanagan marked this pull request as ready for review November 21, 2023 01:51
@waltflanagan waltflanagan changed the title Multiplatform - Migrate ProjectDescription.Target to support multiple platforms [Multiplatform] Migrate ProjectDescription.Target to support multiple platforms Nov 21, 2023
Copy link
Collaborator

@kwridan kwridan left a comment

Choose a reason for hiding this comment

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

thanks @waltflanagan

Sources/ProjectDescription/TargetDependency.swift Outdated Show resolved Hide resolved
Sources/TuistCore/Graph/GraphLoader.swift Outdated Show resolved Hide resolved
Copy link
Collaborator

@kwridan kwridan left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the all the updates @waltflanagan 👍

The introduction of Condition and CombinationResults makes things a lot more clearer and easier to follow

I retested the changes against our project and looks like there are no diffs / regressions 🎉

I believe all my feedback points from #5557 (review) have been addressed, thanks again!

Sources/TuistCore/Graph/GraphDependencyReference.swift Outdated Show resolved Hide resolved
Sources/TuistGenerator/Generator/LinkGenerator.swift Outdated Show resolved Hide resolved
Base automatically changed from multi-platform/GraphEdges to main November 28, 2023 15:23
@waltflanagan waltflanagan merged commit 5813ea8 into main Nov 28, 2023
25 of 27 checks passed
@waltflanagan waltflanagan deleted the multi-platform/FinalInterface branch November 28, 2023 15:36
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.

None yet

3 participants