You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make Test.xcTestCompatibleSelectornonisolated(unsafe) so it can be used with Xcode 15 CLTools. (#582)
When building Swift Testing using Xcode 15.3 or the Xcode 15.3 CLTools
and a prerelease Swift 6 toolchain, the compiler produces an error:
> /Volumes/Dev/Source/swift-testing/Sources/Testing/Test.swift:69:14:
error: stored property 'xcTestCompatibleSelector' of
'Sendable'-conforming struct 'Test' has non-sendable type
'__XCTestCompatibleSelector?' (aka 'Optional<Selector>')
> 67 | /// property is always `nil`.
> 68 | @_spi(ForToolsIntegrationOnly)
> 69 | public var xcTestCompatibleSelector: __XCTestCompatibleSelector?
> | `- error: stored property 'xcTestCompatibleSelector' of
'Sendable'-conforming struct 'Test' has non-sendable type
'__XCTestCompatibleSelector?' (aka 'Optional<Selector>')
Although Xcode 15.3 is not formally supported, this is trivial to
resolve by marking the offending property `nonisolated(unsafe)`. The
property's type (`Selector?` on Darwin, `Never?` elsewhere) is
`Sendable` but `Selector` was not marked as such until Xcode 16.
This change will unblock some workflows that still use Xcode 15.3.
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
0 commit comments