TelemetryDeck / SwiftSDK

Swift SDK for TelemetryDeck, a privacy-conscious analytics service for apps and websites.
https://telemetrydeck.com/
Other
148 stars 30 forks source link

Add support for data-race safety in Xcode 16 #165

Open Jeehut opened 6 days ago

Jeehut commented 6 days ago

In September Apple will release Swift 6 which introduces compile-time safety against data-races in concurrent code. As we have web callbacks in the repo, it's very likely we will have some failures that need to be fixed in Swift 6 mode.

In the related WWDC session this year Apple urged third-party framework developers to adopt Swift 6 language mode fast so our community can profit from the additional safety. So we should turn on "complete concurrency checking" for Swift 5 in Xcode 16 beta before September and fix any warnings and make a release with the fixes up-front.

This should make the lib ready for Swift 6 language mode, which when enabled should not cause any build errors any more. I'm not sure how things work with enabling Swift 6 language mode in packages that want to support older Xcode versions, I'd research that. But the "complete concurrency checking" should have the same effect as we would get warnings.

@winsmith Not sure which board this fits into best. It's not super urgent, probably August is a good time to tackle this.