Skip to content

[FR]: Making Model Objects Sendable #14369

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

Closed
Blackjacx opened this issue Jan 22, 2025 · 3 comments · Fixed by #14439
Closed

[FR]: Making Model Objects Sendable #14369

Blackjacx opened this issue Jan 22, 2025 · 3 comments · Fixed by #14439

Comments

@Blackjacx
Copy link

Blackjacx commented Jan 22, 2025

Description

Now as we convert our project to Swift Concurrency and Swift 6 we came across the warning Stored property 'snapshot' of 'Sendable'-conforming struct 'FirebaseUpdate' has non-sendable type 'DataSnapshot'; this is an error in the Swift 6 language mode in this object:

import FirebaseDatabase

struct FirebaseUpdate: Sendable {
    var snapshot: DataSnapshot
}

To silence this we could add @preconcurrency but we also loose sight of these warnings then.

Therefore my question: Is ther a specific timeline for when this model object will become Sendable?

I tested with version 11.7.0 today and still get this.

API Proposal

No response

Firebase Product(s)

Database

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@ncooke3
Copy link
Member

ncooke3 commented Jan 22, 2025

Thanks, @Blackjacx, we are actively working on improving Swift 6 support across Firebase. Some of the changes can be done incrementally and some of the changes require a breaking change. I have not audited FirebaseDatabase yet, but will take a closer look.

@glowcap
Copy link

glowcap commented Jan 24, 2025

@ncooke3, would it be possible to ensure ListenerRegistration also conforms to Sendable in this work?

@firebase firebase locked and limited conversation to collaborators Mar 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants