Make HTTPSCallableResult Sendable to fix Swift 6 bridge data-race error#93
Closed
IT-Guy007 wants to merge 1 commit into
Closed
Make HTTPSCallableResult Sendable to fix Swift 6 bridge data-race error#93IT-Guy007 wants to merge 1 commit into
IT-Guy007 wants to merge 1 commit into
Conversation
The swift-tools-version bump to 6.1 in 0.20.0 puts the package and its skipstone-generated *_Bridge.swift files into Swift 6 language mode, where strict-concurrency violations are errors. The generated SkipFirebaseFunctions bridge resumes a continuation with an HTTPSCallableResult via the 'sending' resume(returning:) parameter, but the re-exported FirebaseFunctions HTTPSCallableResult is not Sendable, triggering #SendingRisksDataRace. Add a retroactive @unchecked Sendable conformance, mirroring the same fix 0.20.0 already applied to Firestore, CollectionReference and Messaging. Fixes skiptools#92
Contributor
Author
|
@marcprux please approve and create version 0.20.1 |
Member
I followed-up at #92 (comment) |
Contributor
Author
|
@marcprux the issue has been fixed with the latest skip version, up to you if you still want to merge this pr. Functions does miss |
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.
Summary
Fixes #92.
Since 0.20.0 bumped
swift-tools-versionto 6.1, the package and its skipstone-generated*_Bridge.swiftfiles compile in Swift 6 language mode, where strict-concurrency violations are hard errors. The generatedSkipFirebaseFunctionsbridge resumes its continuation with the call result:resume(returning:)takes asendingparameter under Swift 6, but the re-exportedFirebaseFunctions.HTTPSCallableResultis notSendable, so passing it across the task-isolation boundary is rejected. This compiled fine under 0.19.0 (tools-version 5.9, where it was at most a warning).Change
Add a retroactive
@unchecked Sendableconformance forHTTPSCallableResult, mirroring the exact pattern 0.20.0 already applied toFirestore,CollectionReferenceandMessaging— Functions was simply missed.Verification
swift build --target SkipFirebaseFunctions(Darwin) compiles clean; the generated functions bridge no longer raises#SendingRisksDataRace.