Skip to content
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

Turn on strict concurrency. #57

Merged
merged 4 commits into from
Apr 15, 2024
Merged

Turn on strict concurrency. #57

merged 4 commits into from
Apr 15, 2024

Conversation

mbrandonw
Copy link
Member

No description provided.

Package.swift Outdated
@@ -27,35 27,38 @@ let package = Package(
"PerceptionMacros",
.product(name: "OrderedCollections", package: "swift-collections"),
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's tag this branch with a pseudo-release so that we can confirm that this doesn't break downstream builds.

@Brett-Best
Copy link

Might be worth turning on GlobalConcurrency too?

@mbrandonw
Copy link
Member Author

Hi @Brett-Best, thanks for the suggestion! I can definitely add that, but it also seems to be a subset of StrictConcurrency as far as I can tell. I get the global mutable state warning when only StrictConcurrency is specified in Package.swift.

Are you aware of anything that GlobalConcurrency surfaces that is not covered by StrictConcurrency?

@Brett-Best
Copy link

Ah, looks like it's enabled implicitly when StrictConcurrency is on 😅
https://github.com/apple/swift/blob/17ca88c94a34b34c3c354891e899e82ce98f46ee/lib/Frontend/CompilerInvocation.cpp#L979-L983

@mbrandonw mbrandonw merged commit 866eae4 into main Apr 15, 2024
2 checks passed
@mbrandonw mbrandonw deleted the turn-on-strict-concurrency branch April 15, 2024 21:22
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.

None yet

3 participants