Skip to content
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

Add sending to returned values from async Storage APIs #14321

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

morganchen12
Copy link
Contributor

This allows returned values to be used in async contexts. Otherwise, the following example:

let root = Storage.storage().reference()

// Get metadata properties
do {
  let metadata = try await root.getMetadata()
} catch {
  // ...
}

Produces an error:

Non-sendable type 'StorageMetadata' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary

Annotating these values as sending requires no other conformance work since references to the returned values are not held by Storage. See the sending proposal for more details.

@google-oss-bot
Copy link

1 Warning
⚠️ Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by 🚫 Danger

Copy link
Contributor

github-actions bot commented Jan 8, 2025

Apple API Diff Report

Commit: 909266e
Last updated: Wed Jan 8 16:05 PST 2025
View workflow logs & download artifacts


[BUILD ERROR] FirebaseStorage


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants