Skip to content

Conversation

@grynspan
Copy link
Contributor

When `NonisolatedNonsendingByDefault` is enabled, overload resolution of
`ExitTest.__store()` picks the overload that takes any old `T` instead of taking
a function. This overload exists only to suppress certain unhelpful compiler
diagnostics and its implementation immediately aborts, which causes the
described failure.

Adding `nonisolated(nonsending)` or `@concurrent` to the "good" overload doesn't
appear to satisfy the type checker, so mark the "bad" overload as explicitly
disfavoured instead.

Resolves #1375.
@grynspan grynspan added this to the Swift 6.2.2 milestone Nov 10, 2025
@grynspan grynspan self-assigned this Nov 10, 2025
@grynspan grynspan added bug 🪲 Something isn't working concurrency 🔀 Swift concurrency/sendability issues workaround Workaround for an issue in another component (may need to revert later) exit-tests ☠️ Work related to exit tests labels Nov 10, 2025
@grynspan grynspan changed the title [6.2] Ensure NonisolatedNonsendingByDefault doesn't break exit tests. [6.2.2] Ensure NonisolatedNonsendingByDefault doesn't break exit tests. Nov 10, 2025
@stmontgomery
Copy link
Contributor

@swift-ci please test

@grynspan grynspan changed the base branch from release/6.2 to release/6.2.2 November 10, 2025 19:12
@grynspan
Copy link
Contributor Author

The CI failure we're seeing is due to a regression in the 6.3 compiler (which is being used to build this branch despite us targetting 6.2.2, such is life.) We believe the regression is resolved by swiftlang/swift#85410, but that isn't in a toolchain yet. The regression does not affect 6.2.2 itself.

@grynspan grynspan merged commit 3a64583 into release/6.2.2 Nov 12, 2025
1 of 3 checks passed
@grynspan grynspan deleted the jgrynspan/1375-nonisolated-nonsending-6.2 branch November 12, 2025 16:23
@stmontgomery stmontgomery added the integration ⚙️ Integrating work to release branches label Nov 13, 2025
stmontgomery added a commit that referenced this pull request Nov 13, 2025
#1421)

- **Explanation**: Adjust the (non-ABI-affecting) signature of an
underlying function used by the expansion of the
`#expect(processExitsWith:)` macro so that when Approachable Concurrency
is enabled, we pick the correct overload of said function.
- **Scope**: Exit tests with Approachable Concurrency enabled.
- **Issues**: #1375
- **Original PRs**:
#1383, #1407
- **Risk**: Low
- **Testing**: Existing CI jobs and manual verification. It is not
possible at this time to write a unit test for this fix due to
swiftlang/swift-package-manager#9293.
- **Reviewers**: @grynspan @briancroom @jerryjrchen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🪲 Something isn't working concurrency 🔀 Swift concurrency/sendability issues exit-tests ☠️ Work related to exit tests integration ⚙️ Integrating work to release branches workaround Workaround for an issue in another component (may need to revert later)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants