Skip to content

Prepare XCGradleHarness for NonisolatedNonsendingByDefault#676

Open
dfabulich wants to merge 1 commit intoskiptools:mainfrom
dfabulich:xcgradleharness-nonisolated-nonsending-default
Open

Prepare XCGradleHarness for NonisolatedNonsendingByDefault#676
dfabulich wants to merge 1 commit intoskiptools:mainfrom
dfabulich:xcgradleharness-nonisolated-nonsending-default

Conversation

@dfabulich
Copy link
Copy Markdown
Contributor

Fixes #675

The issue occurred because the skip project is built without NonisolatedNonsendingByDefault, which means that runGradleTests and invokeGradle were @concurrent by legacy default, forbidden to access self or any task-isolated members.

The generated XCSkipTests file in the end-user's project, however, is NonisolatedNonsendingByDefault on Swift 6.2, which means that testSkipModule method became task-isolated. (I'm a little unclear on how/why the test became task-isolated, but it did.)

We could have fixed this by updating skip to Swift 6.2+ and enabling NonisolatedNonsendingByDefault and other "Approachable Concurrency" features there, but this is easier, and will continue to work if/when we upgrade skip in the future. (When skip does decide to enable NonisolatedNonsendingByDefault, these annotations will simply reiterate the default.)

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Fixes skiptools#675

The issue occurred because the `skip` project is built without `NonisolatedNonsendingByDefault`, which means that `runGradleTests` and `invokeGradle` were `@concurrent` by legacy default, forbidden to access `self` or any `task-isolated` members.

The generated `XCSkipTests` file in the end-user's project, however, _is_ `NonisolatedNonsendingByDefault` on Swift 6.2, which means that `testSkipModule` method became task-isolated. (I'm a little unclear on how/why the test became task-isolated, but it did.)

We could have fixed this by updating `skip` to Swift 6.2+ and enabling `NonisolatedNonsendingByDefault` and other "Approachable Concurrency" features there, but this is easier, and will continue to work if/when we upgrade `skip` in the future. (When `skip` does decide to enable `NonisolatedNonsendingByDefault`, these annotations will simply reiterate the default.)
@cla-bot cla-bot Bot added the cla-signed Automatically-added indication of a signed Contributor License Agreement label Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed Automatically-added indication of a signed Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XCSkipTests doesn't compile in projects with Swift "Approachable Concurrency" enabled

1 participant