Skip to content

Skip-Firebase 0.20.0 causes data racing issues #92

Description

@IT-Guy007

Root cause

The regression is the swift-tools-version bump from 5.9 → 6.1 in 0.20.0 (Package.swift). That puts the package including the skipstone-generated *_Bridge.swift files into Swift 6 language mode, where strict-concurrency violations are errors instead of warnings.

The generated functions bridge does f_continuation.resume(returning: f_return!), where f_return is an HTTPSCallableResult. Under Swift 6, resume(returning:) takes a sending parameter, but the re-exported FirebaseFunctions.HTTPSCallableResult is not Sendable, so the value can't cross the task-isolation boundary → #SendingRisksDataRace.

0.20.0 already added @retroactive @unchecked Sendable for Firestore, CollectionReference and Messaging to handle the same Swift-6 fallout, but SkipFirebaseFunctions was missed.

Fix

Adding the matching conformance resolves it:

extension HTTPSCallableResult: @retroactive @unchecked Sendable {}
2026-06-27T09:00:30.1954460Z /<>/.build/Darwin/DerivedData/Build/Intermediates.noindex/BuildToolPluginIntermediates/club-app.output/<>/skipstone/<>/build/swift/plugins/outputs/skip-firebase/SkipFirebaseFunctions/destination/skipstone/SkipBridgeGenerated/SkipFirebaseFunctions_Bridge.swift:253:36: error: sending 'f_return' risks causing data races [#SendingRisksDataRace]
2026-06-27T09:00:30.1956280Z 251 |                     f_continuation.resume(throwing: JThrowable.toError(f_error, options: [])!)
2026-06-27T09:00:30.1956720Z 252 |                 } else {
2026-06-27T09:00:30.1957020Z 253 |                     f_continuation.resume(returning: f_return!)
2026-06-27T09:00:30.1957460Z     |                                    |- error: sending 'f_return' risks causing data races [#SendingRisksDataRace]
2026-06-27T09:00:30.1958150Z     |                                    `- note: task-isolated 'f_return' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
2026-06-27T09:00:30.1958650Z 254 |                 }
2026-06-27T09:00:30.1958840Z 255 |             }
2026-06-27T09:00:30.1958960Z 
2026-06-27T09:00:30.1959260Z [#SendingRisksDataRace]: <https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race>

PR: #93

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions