Closed jonmountjoy closed 1 year ago
This smells like https://invertase.io/blog/react-native-firebase-versioning but for FlutterFire ... (In short, I agree personally this is hard with FlutterFire independent versions)
That looks nice @mikehardy . Last night I tried every combination I could in order to upgrade my Flutter Firebase packages, and find a compatible frameworks git tag, and failed 😞 I also left a note last week on the new documentation to point out that the previous documentation always had a page listing "all the compatible latest versions of Firestore packages". I imagine they're almost always are compatible, but when I get an error like below, I never know 🤷
Parse Issue (Xcode): Expected a type
/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.3.0/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:42:3
Parse Issue (Xcode): Expected a type
/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.3.0/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:44:3
Parse Issue (Xcode): Expected a type
/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.3.0/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:45:39
Generics Issue (Xcode): No type or protocol named 'FIRListenerRegistration'
/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.3.0/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:11:32
Semantic Issue (Xcode): Use of undeclared identifier 'FIRFirestore'
/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.3.0/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:18:2
Semantic Issue (Xcode): Use of undeclared identifier 'firestore'
/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.3.0/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:18:16
Semantic Issue (Xcode): Use of undeclared identifier 'firestore'
/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.3.0/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:26:31
ARC Semantic Issue (Xcode): No known instance method for selector 'remove'
/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.3.0/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:32:29
Encountered error while building for device.
The only way I know to tell which FlutterFire module versions are compatible with which firebase-ios-sdk is to look at the commit in core module that bumps the internal firebase-ios-sdk dependency, and find what the corresponding first release of that commit was, in the flutterfire modules. Not a beautiful workflow, but it's conclusive at least. I know that firebase-ios-sdk v9.0.0+ is all compatible with itself though (for all cases I know of that FlutterFire uses) so once a single v9.0.0 is in as a dependency commit, any flutterfire module that version or higher for that dependency commit should be cross-compatible with anything else in the firebase-ios-sdk v9 major range.
The only way I know to tell which FlutterFire module versions are compatible with which firebase-ios-sdk is to look at the commit in core module that bumps the internal firebase-ios-sdk dependency, and find what the corresponding first release of that commit was, in the flutterfire modules.
@jonmountjoy
A little more details: this is the file (in the flutterfire
repository) that I usually check for the compatible version of firebase-ios-sdk
.
For example, on the master
branch, it wrote 👇🏻
# https://firebase.google.com/support/release-notes/ios
def firebase_sdk_version!()
'9.3.0'
end
I then switch to another tag, let's say to find out the required version for firebase_core: ^1.17.1
(switch to tag firebase_core-v1.17.1
). The content of the file will then change to 👇🏻 (a different version of fiirebase-ios-sdk
is compatible)
# https://firebase.google.com/support/release-notes/ios
def firebase_sdk_version!()
'8.15.0'
end
Thank you - that helps @kuanyi-ng . How do I determine it for other modules though. For example, even though the SDK version is 9.3.0 for firebase-core, I can't find something similar for, say, Firebase Storage. I guess the umbrella question is: "how do I determine which of the Flutter modules are compatible with each other, as well as with 9.3.0". (Right now, they don't appear to be)
@jonmountjoy
how do I determine which of the Flutter modules are compatible with each other, as well as with 9.3.0". (Right now, they don't appear to be)
Currently, there isn't a note/document that has information about the compatibility of Firebase Flutter modules with each other (I might be wrong).
After checking the dependencies of each Firebase Flutter module on https://pub.dev/, it seems like they only depend on firebase_core
and do not depend on each other (e.g., firebase_storage
depending on firebase_auth
.)
Showing the dependencies as a diagram, we will get something like this 👇🏻
flowchart TD
cloud_firestore -->|needs| firebase_core
firebase_auth -->|needs| firebase_core
firebase_analytics -->|needs| firebase_core
firebase_storage -->|needs| firebase_core
firebase_core --> |needs| firebase_ios_sdk
While it's still difficult to determine the compatibility between each module, making sure that all FlutterFire modules depend on the same version of firebase_core
(= same version of firebase-ios-sdk
) is one of the possible approaches.
I don't think this is actionable here, but there is plenty of information to help people go searching until/unless versioning style changes in FlutterFire, so I'm going to close this. It is not locked or anything though, if anyone comes up with a good method or has news from the future that is helpful to others, please post your helpful details. Cheers
This project is invaluable - without it, Flutter and Firestore compilation take forever.
Knowing which package versions are compatible with each tag release, is difficult, and sometimes costs me a lot of time.
An example of failure
For example, here are the latest package versions:
They are not compatible with 9.3.0 or 9.2.0 or 9.1.0. How can I find out what the most recent compatible release those are compatible with?
An example of success
These packages are compatible with
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.15.0'
Summary
Is there some way to associate with each release some package version numbers so we can determine compatibility?
Thank you!