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

Update FIRAuthInterop to use _Nullable_result annotation #12841

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

andrewheard
Copy link
Contributor

The getTokenForcingRefresh:withCallback: method in FirebaseAuthInterop can invoke the completion handler with nil, nil but (void (^)(SomeType *_Nullable value, NSError *_Nullable error)) completion blocks are translated to async throws -> SomeType in Swift async/await. The _Nullable_result annotation, instead of just _Nullable, signals that the return type may be nil even when no error is thrown; see Swift SE-0297 for more details.

Before:
func getToken(forcingRefresh forceRefresh: Bool) async throws -> String

After:
func getToken(forcingRefresh forceRefresh: Bool) async throws -> String?

#no-changelog

Copy link
Member

@ncooke3 ncooke3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL! Nice find here.

@google-oss-bot
Copy link

google-oss-bot commented Apr 23, 2024

Coverage Report 1

Affected Products

  • FirebaseDatabase-iOS-FirebaseDatabase.framework

    Overall coverage changed from 56.83% (c9d013b) to 56.78% (383073d) by -0.05%.

    FilenameBase (c9d013b)Merge (383073d)Diff
    FIRRetryHelper.m83.33%88.10%+4.76%
    FSRWebSocket.m38.29%38.14%-0.15%
    FWebSocketConnection.m41.74%37.19%-4.55%
  • FirebaseFirestore-iOS-FirebaseFirestoreInternal.framework

    Overall coverage changed from 88.21% (c9d013b) to 88.11% (383073d) by -0.10%.

    FilenameBase (c9d013b)Merge (383073d)Diff
    exception.cc84.21%23.68%-60.53%
    grpc_stream.cc98.02%99.01%+0.99%
    leveldb_key.cc98.63%98.82%+0.20%
    ordered_code.cc94.39%93.90%-0.49%
    serializer.cc91.31%91.00%-0.31%
    watch_stream.cc95.35%90.70%-4.65%

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/HHzQRw7pE4.html

@andrewheard andrewheard merged commit 88c47ba into main Apr 23, 2024
165 checks passed
@andrewheard andrewheard deleted the ah/auth-interop-nullable-result branch April 23, 2024 22:13
andrewheard added a commit that referenced this pull request Apr 26, 2024
andrewheard added a commit that referenced this pull request Apr 29, 2024
cgrindel-self-hosted-renovate bot added a commit to cgrindel/rules_swift_package_manager that referenced this pull request May 1, 2024
….25.0" (#1056)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[firebase/firebase-ios-sdk](https://github.com/firebase/firebase-ios-sdk)
| minor | `from: "10.24.0"` -> `from: "10.25.0"` |

---

### Release Notes

<details>
<summary>firebase/firebase-ios-sdk (firebase/firebase-ios-sdk)</summary>

###
[`v10.25.0`](https://github.com/firebase/firebase-ios-sdk/releases/tag/10.25.0):
Firebase Apple 10.25.0

[Compare
Source](https://github.com/firebase/firebase-ios-sdk/compare/10.24.0...10.25.0)

The Firebase Apple SDK (10.25.0) is now available. For more details, see
the [Firebase Apple SDK release
notes.](https://firebase.google.com/support/release-notes/ios#10.25.0)

To install this SDK, see [Add Firebase to your
project.](https://firebase.google.com/docs/ios/setup)

#### What's Changed

- \[FirebaseCoreInternal] Switch to implementation-only import of GULs
by [@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12714
- \[AppCheck, Database, InAppMessaging, MLModelDownloader, Performance,
Sessions] Migrate to GoogleUtilities's storage container by
[@&#8203;ncooke3](https://github.com/ncooke3) in
[#&#8203;12752](https://github.com/firebase/firebase-ios-sdk/issues/12752),
[#&#8203;12753](https://github.com/firebase/firebase-ios-sdk/issues/12753),
[#&#8203;12757](https://github.com/firebase/firebase-ios-sdk/issues/12757),
[#&#8203;12759](https://github.com/firebase/firebase-ios-sdk/issues/12759),
[#&#8203;12762](https://github.com/firebase/firebase-ios-sdk/issues/12762),
[#&#8203;12773](https://github.com/firebase/firebase-ios-sdk/issues/12773)
- Use declspec in Firestore on Windows machines by
[@&#8203;a-maurice](https://github.com/a-maurice) in
[firebase/firebase-ios-sdk#12758
- \[CI] Stop Xcode 14, start Xcode 15.3 by
[@&#8203;paulb777](https://github.com/paulb777) in
[firebase/firebase-ios-sdk#12746
- \[Performance] Migrate to GoogleUtilities's storage container by
[@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12759
- Todos and workarounds for tests not yet ready for macos-14 by
[@&#8203;paulb777](https://github.com/paulb777) in
[firebase/firebase-ios-sdk#12781
- Another macos-14 CI workaround by
[@&#8203;paulb777](https://github.com/paulb777) in
[firebase/firebase-ios-sdk#12787
- \[CI] Update grpc dependent jobs to macos-14 by
[@&#8203;paulb777](https://github.com/paulb777) in
[firebase/firebase-ios-sdk#12790
- \[Firestore] Remove DocumentID setter warning by
[@&#8203;andrewheard](https://github.com/andrewheard) in
[firebase/firebase-ios-sdk#12756
- \[App Check] Bump dependency on AppCheckCore to 10.19.0+ by
[@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12806
- Allow Blob of data with zero length. by
[@&#8203;tom-andersen](https://github.com/tom-andersen) in
[firebase/firebase-ios-sdk#12694
- \[Infra] Switch zip building over to Xcode 15.2 by
[@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12737
- Make use of
SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION
conditional. by
[@&#8203;cprince-foreflight](https://github.com/cprince-foreflight) in
[firebase/firebase-ios-sdk#12548
- \[Release Tooling] Consistent approach to resources when building on
Xcode 15 by [@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12821
- \[Release Tooling] Cleanup unused folder references by
[@&#8203;ncooke3](https://github.com/ncooke3) in
[firebase/firebase-ios-sdk#12825
- Analytics 10.25.0 by [@&#8203;pcfba](https://github.com/pcfba) in
[firebase/firebase-ios-sdk#12843
- Update `FIRAuthInterop` to use `_Nullable_result` annotation by
[@&#8203;andrewheard](https://github.com/andrewheard) in
[firebase/firebase-ios-sdk#12841
- Disable quickstart CI that doesn't work with Xcode 15 by
[@&#8203;paulb777](https://github.com/paulb777) in
[firebase/firebase-ios-sdk#12846

#### New Contributors

- [@&#8203;mrs1669](https://github.com/mrs1669) made their first
contribution in
[firebase/firebase-ios-sdk#12760
- [@&#8203;a-maurice](https://github.com/a-maurice) made their first
contribution in
[firebase/firebase-ios-sdk#12758
- [@&#8203;cprince-foreflight](https://github.com/cprince-foreflight)
made their first contribution in
[firebase/firebase-ios-sdk#12548

**Full Changelog**:
firebase/firebase-ios-sdk@10.24.0...10.25.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDkuNCIsInVwZGF0ZWRJblZlciI6IjM2LjEwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
@firebase firebase locked and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants