-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Remove @MainActor
from XCTest glue.
#7967
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
Remove @MainActor
from XCTest glue.
#7967
Conversation
Removes `@MainActor` and adds `nonisolated(unsafe)` to suppress concurrency diagnostics in the XCTest glue code generated when using corelibs-xctest.
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have a radar which is going to be fixed by this, I'll try to find it.
@swift-ci please test windows |
@swift-ci test Windows |
Test failure on Windows, thought it seems to be in the foundation tests... |
@swift-ci test windows |
@swift-ci test Windows |
@swift-ci test Windows |
SPM and swift-corelibs-xctest do not support main-actor-isolated tests unless they are marked `async` because the compilation stage that finds tests is not actor-aware. This test is preventing us from merging swiftlang/swift-package-manager#7967.
@swift-ci test |
1 similar comment
@swift-ci test |
**Explanation:** Remove `@MainActor` annotations from corelibs-xctest glue functions that are no longer needed. **Scope:** corelibs-xctest glue code **Issue:** [N/A](rdar://130066460) **Original PR:** #7967 **Risk:** Unknown **Testing:** Existing CI jobs **Reviewer:** @bnbarham @briancroom @DougGregor @shahmishal
Removes
@MainActor
and addsnonisolated(unsafe)
to suppress concurrency diagnostics in the XCTest glue code generated when using corelibs-xctest.See also #7960.