FORGE-1549-Fixes for Swift 6.3#120
Merged
Bryan Malumphy (bmalumphy) merged 1 commit intomainfrom Mar 30, 2026
Merged
Conversation
Contributor
🟢 Test Coverage Report -
|
| Metric | Coverage | Status |
|---|---|---|
| 🟢 Lines | 86.6% | green |
| 🟢 Statements | 86.6% | green |
| 🟢 Functions | 92.45% | green |
| 🟢 Branches | 86.08% | green |
📊 View Detailed Coverage Report
ℹ️ Coverage Thresholds
- 🟢 Excellent (≥ 80%)
- 🟡 Good (60-79%)
- 🟠 Fair (40-59%)
- 🔴 Poor (< 40%)
Contributor
🟢 Test Coverage Report -
|
| Metric | Coverage | Status |
|---|---|---|
| 🟢 Lines | 91.94% | green |
| 🟢 Statements | 91.94% | green |
| 🟢 Functions | 86.11% | green |
| 🟢 Branches | 88.67% | green |
📊 View Detailed Coverage Report
ℹ️ Coverage Thresholds
- 🟢 Excellent (≥ 80%)
- 🟡 Good (60-79%)
- 🟠 Fair (40-59%)
- 🔴 Poor (< 40%)
Tom (tdwells90)
approved these changes
Mar 30, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix Swift 6.3 strict concurrency errors in
Concurrency.swiftProblem
Under Xcode 26.4 / Swift 6.3 with strict concurrency checking enabled, the
asyncMapPublisher extension produced two errors:"Sending Main actor-isolated value to nonisolated callee risks causing data races" —
asyncMapwas marked@MainActor, makingvalue(of typeOutput) main-actor-isolated.Future'sattemptToFulfillclosure is a plain escaping, nonisolated closure, so Swift 6.3 flagged the capture ofvalueas an unsafe send across actor boundaries."Passing closure as a 'sending' parameter risks causing data races" — After removing
@MainActor,Future.Promise((Result<T, Failure>) -> Void) is notSendable. Swift 6.3'sTaskinitializer requires asendingclosure, so capturingpromiseinsideTask { }was rejected.Solution
@MainActorfrom bothasyncMapoverloads. The functions only build a Combine chain and have no reason to be main-actor-isolated.where Output: Sendableon the extension. Values crossing task boundaries must beSendable— this is the correct Swift 6 constraint.@SendableandT: Sendableto the transform closures, required because they escape intoTask.SendableBox<T>: @unchecked Sendable— a minimal wrapper that allowsFuture.Promise(a non-Sendableclosure) to be captured byTask'ssendingclosure. This is safe because each box is created once perFuture, the promise is called exactly once from a single task, and there is no concurrent mutation.Files Changed
sdks/swift/Sources/DittoChatCore/Utilities/Concurrency.swift