Skip to content

Fix breaking QuickSpec usage when building under Strict Concurrency#1299

Open
younata wants to merge 2 commits into
mainfrom
quickspec_strict_concurrency_failures
Open

Fix breaking QuickSpec usage when building under Strict Concurrency#1299
younata wants to merge 2 commits into
mainfrom
quickspec_strict_concurrency_failures

Conversation

@younata
Copy link
Copy Markdown
Member

@younata younata commented Sep 8, 2024

Fixes #1298

#1289, which seemed like good idea at the time, ended up breaking standard specs when building under strict concurrency.

This will reintroduce build errors of type "Main actor-isolated property 'stateSubject' can not be referenced from a non-isolated context" and "Call to main actor-isolated initializer 'init()' in a synchronous nonisolated context" when calling main actor-actor isolated code from a QuickSpec. The workaround for these errors is to wrap the code in MainActor.assumeIsolated.

Admin note: Before I release the next version of Quick with this change, I'm going to look at other ways to mitigate the "Main actor-isolated ..." errors.

Revert "Added MainActor annotation to the closure for the added test method"

This reverts commit 5959249.
Revert "Updated closures in QuickSpec to be annotated with MainActor"

This reverts commit 24c0757.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 8, 2024

1 Warning
⚠️ Need to add an unit test if you're modifying swift source

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strict Concurrency - Unable to access properties defined outside of various ExampleClosures.

1 participant