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

Allow patch updates to dependencies? #115

Open
ChaseGuru opened this issue Nov 13, 2024 · 2 comments
Open

Allow patch updates to dependencies? #115

ChaseGuru opened this issue Nov 13, 2024 · 2 comments

Comments

@ChaseGuru
Copy link

I was getting an error when trying to add:

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '11.4.0'

When it works fine with my Podfile locking - Firebase/Firestore (11.4.0): and - Firebase/Firestore (11.4.0):.

My iOS minimum deployment target is 13.0
Podfile:

platform :ios, '13.0'

...

And every instance of deployment target in the pbx project is:
IPHONEOS_DEPLOYMENT_TARGET = 13.0;

But I get this error doing a pod install:

firebase_crashlytics: Using Firebase SDK version '11.4.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "FirebaseCoreExtension":
  In snapshot (Podfile.lock):
    FirebaseCoreExtension (= 11.4.1, ~> 11.4)

  In Podfile:
    FirebaseCoreExtension (= 11.0.0)

Specs satisfying the `FirebaseCoreExtension (= 11.0.0), FirebaseCoreExtension (= 11.4.1, ~> 11.4)` dependency were found, but they required a higher minimum deployment target.

I swear that was happening with pod update or when I removed the podfile.lock alike, and it was throwing me off because it sounds like it's saying it wants me to upgrade my deployment target for iOS.

Though, if I manually specify FirebaseCoreExtension 11.4.0, it works.

  pod 'FirebaseCoreExtension', '11.4.0'
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '11.4.0'

But resetting, it's now working if I pod update or rm Podfile.lock. I'm not sure what changed, BUT at this point it seems like the error is just because I had resolved 11.4.1 and your package requires 11.4.0 specifically.

It still seems like a bad cocoapods error, i would expect something like:

In compatible requirements `FirebaseCoreExtension (= 11.4.1, ~> 11.4), FirebaseCoreExtension (= 11.4.0)`

but maybe this is the typical error 🤷

Request:
So perhaps some of this was me being dumb somehow and not doing pod update/removing the Pod lock like I thought, though it also seems like it may be good for the package to be allowing patch updates:

In addition to the logic operators CocoaPods has an optimistic operator ~>:

'~> 0.1.2' Version 0.1.2 and the versions up to 0.2, not including 0.2 and higher

Since I suspect your package isn't actually incompatible with for example 11.4.1. So perhaps:

  s.dependency 'FirebaseCore', firebase_firestore_version
  s.dependency 'FirebaseCoreExtension', firebase_firestore_version
  s.dependency 'FirebaseFirestoreInternalBinary', firebase_firestore_version
  s.dependency 'FirebaseSharedSwift', firebase_firestore_version

Should be something like:

  s.dependency 'FirebaseCore', "~> #{firebase_firestore_version}"
  s.dependency 'FirebaseCoreExtension', "~> #{firebase_firestore_version}"
  s.dependency 'FirebaseFirestoreInternalBinary', "~> #{firebase_firestore_version}"
  s.dependency 'FirebaseSharedSwift', "~> #{firebase_firestore_version}"
@mikehardy
Copy link
Collaborator

We've had problems with optimistic locking letting versions slip and creating unexpected problems with transitives breaking builds, so they're exact in purpose. I thought they would be better as well but in practice, over a long enough time scale, it has caused us problems

@mikehardy
Copy link
Collaborator

Here is the problem I mention, for posterity - which was actually an incompatibility with an untested patch release:

firebase/flutterfire#13527

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

No branches or pull requests

2 participants