-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[6.0.1] Remove @MainActor
from XCTest glue.
#7960
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
grynspan
merged 2 commits into
release/6.0.1
from
jgrynspan/remove-main-actor-isolation-from-xctest-glue-6.0.0
Sep 17, 2024
Merged
[6.0.1] Remove @MainActor
from XCTest glue.
#7960
grynspan
merged 2 commits into
release/6.0.1
from
jgrynspan/remove-main-actor-isolation-from-xctest-glue-6.0.0
Sep 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grynspan
added a commit
to swiftlang/swift-testing
that referenced
this pull request
Sep 11, 2024
…ated test. We have one `@MainActor`, `async` test on a non-sendable `XCTestCase` subclass. Not surprisingly, this doesn't work fantastically well. Move the test out of the class to fix the resulting compiler diagnostic. Related to swiftlang/swift-package-manager#7960.
2 tasks
DougGregor
reviewed
Sep 11, 2024
DougGregor
approved these changes
Sep 11, 2024
grynspan
added a commit
to swiftlang/swift-testing
that referenced
this pull request
Sep 11, 2024
…ated test. (#680) We have one `@MainActor`, `async` test on a non-sendable `XCTestCase` subclass. Not surprisingly, this doesn't work fantastically well. Move the test out of the class to fix the resulting compiler diagnostic. Related to swiftlang/swift-package-manager#7960. ### 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.
@swift-ci test |
@swift-ci test |
@MainActor
from XCTest glue.@MainActor
from XCTest glue.
@swift-ci test |
bnbarham
approved these changes
Sep 17, 2024
grynspan
added a commit
that referenced
this pull request
Sep 26, 2024
Removes `@MainActor` and adds `nonisolated(unsafe)` to suppress concurrency diagnostics in the XCTest glue code generated when using corelibs-xctest. See also #7960.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
bug
concurrency
swift test
Changes impacting `swift test` tool
swift 6.0
Related to Swift 6.0 release branch
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation: Remove
@MainActor
annotations from corelibs-xctest glue functions that are no longer needed.Scope: corelibs-xctest glue code
Issue: N/A
Original PR: N/A
Risk: Unknown
Testing: Existing CI jobs
Reviewer: @bnbarham @briancroom @DougGregor @shahmishal