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

Add handling for Swift Testing Only Parallelization #871

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

kelvinharron
Copy link

Related to this Tuist issue

Short description 📝

This PR introduces XcodeProj Parallelization handling for the new Swift Testing option. This will enable us to expose the option to Tuist TestingOptions allowing users to specify the option they need, as the default handling in Xcode 16 for Parallelization is going to benefit the few users who have adopted Swift Testing.

I also removed two dead links from the References section as I was going through the reading material.

Solution 📦

From changing the values manually in a real project, I gathered:

Parallelization off in Xcode ->"parallelizable" : false,
Parallelization on in Xcode ->"parallelizable" : true,
Parallelization Swift Testing Only in Xcode -> no value.

With guidance from @fortmarek , I updated the handling of the attributes to cover each individual case.

I've set it as draft as I need guidance on how to prove this handling outside of unit tests. Please let me know what I could be missing and how to verify the output. Thanks.

Implementation 👩‍💻👨‍💻

  • Introduce enums to cover the three unique cases
  • Add handling for each case from.
  • Update tests to handle each case.

Copy link
Member

@fortmarek fortmarek left a comment

Choose a reason for hiding this comment

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

thanks for the PR! Some minor comments, but overall looks good 🤞

Sources/XcodeProj/Scheme/XCScheme+TestableReference.swift Outdated Show resolved Hide resolved
Sources/XcodeProj/Scheme/XCScheme+TestableReference.swift Outdated Show resolved Hide resolved
Tests/XcodeProjTests/Scheme/XCSchemeTests.swift Outdated Show resolved Hide resolved
@kelvinharron kelvinharron marked this pull request as ready for review October 19, 2024 01:20
Copy link
Member

@fortmarek fortmarek left a comment

Choose a reason for hiding this comment

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

Small nits, after those are resolved, we can merge this 🤞

Sources/XcodeProj/Scheme/XCScheme+Parallelizable.swift Outdated Show resolved Hide resolved
Tests/XcodeProjTests/Scheme/XCSchemeTests.swift Outdated Show resolved Hide resolved
Copy link
Member

@fortmarek fortmarek left a comment

Choose a reason for hiding this comment

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

Looks good! Before we merge, can you open a draft PR that updates XcodeGraph in tuist/tuist with this branch, so we can test things E2E there?

@fortmarek
Copy link
Member

@kelvinharron we can merge this one once the CI is green ✅

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