Skip to content

[FR]: Making Model Objects Sendable #14369

Closed

Description

@Blackjacx

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

Activity

  1. google-oss-bot commented on Jan 22, 2025

    @google-oss-bot
    Collaborator

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

  2. self-assigned this
    on Jan 22, 2025
  3. ncooke3 commented on Jan 22, 2025

    @ncooke3
    Member

    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.

  4. glowcap commented on Jan 24, 2025

    @glowcap

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

  5. locked and limited conversation to collaborators on Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions