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

[v11] Simplify Component System Usage #13047

Merged
merged 5 commits into from
Jun 3, 2024
Merged

Conversation

paulb777
Copy link
Member

@paulb777 paulb777 commented Jun 1, 2024

A Component class is not needed for products that don't need to do early initialization and if all of their dependencies are Eager components.

Only registerLibrary needs to run for userAgent configuration. This is done by checking for the existence of an objc class in FIRApp.m. If one doesn't exist at all a singleton empty @objc class is added. See the example in VertexAI.swift.

Fix a Storage unit test that was dependent on a race condition to pass. (URL overrides the bucket name when it pre-existed)

Fix #12957

TODO: Investigate deleting the FIRDependency class which seems to be ignored.

#no-changelog

@paulb777 paulb777 force-pushed the pb-component-cleanup branch from 4f46050 to 6106f13 Compare June 3, 2024 21:26
@paulb777
Copy link
Member Author

paulb777 commented Jun 3, 2024

Going to merge here. I'll address any additional comments in a future PR

@paulb777 paulb777 merged commit 8719e5a into release-11.0 Jun 3, 2024
92 of 94 checks passed
@paulb777 paulb777 deleted the pb-component-cleanup branch June 3, 2024 22:45

/// A map of active instances, grouped by app. Keys are FirebaseApp names and values are arrays
/// containing all instances of Storage associated with the given app.
private static var instances: [String: Storage] = [:]
Copy link
Member

Choose a reason for hiding this comment

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

Found a small inconsistency between the comment and the code:

/// values are arrays containing all instances of Storage associated with the given app.

but

values are not arrays

private static var instances: [String: Storage] = [:]

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed comment in #13055

Comment on lines +120 to +122
/// Class to enable VertexAI to register via the Objective-C based Firebase component system.
@objc(FIRVertexAIComponent) class FirebaseVertexAIComponent: NSObject {}

Copy link
Member

Choose a reason for hiding this comment

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

can this be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, see updated comment in #13055

@firebase firebase locked and limited conversation to collaborators Jul 9, 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.

4 participants