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

Lock the version of the dependencies of the Podfile dependencies #2318

Closed
kylef opened this issue Jul 21, 2014 · 14 comments
Closed

Lock the version of the dependencies of the Podfile dependencies #2318

kylef opened this issue Jul 21, 2014 · 14 comments
Assignees
Labels
d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Milestone

Comments

@kylef
Copy link
Contributor

kylef commented Jul 21, 2014

Example:

pod 'ARAnalytics/GoogleAnalytics'
$ pod install
...
Using GoogleAnalytics-iOS-SDK (3.0.7)
...
$ # wait for 3.0.8 to be released
$ pod install
...
Installing GoogleAnalytics-iOS-SDK 3.0.8 (was 3.0.7)
...
diff --git a/Podfile.lock b/Podfile.lock
index d199451..aeca066 100644
--- a/Podfile.lock
+++ b/Podfile.lock
@@ -52,7 +52,7 @@ PODS:
-  - GoogleAnalytics-iOS-SDK (3.0.7)
+  - GoogleAnalytics-iOS-SDK (3.0.8)
@@ -144,7 +144,7 @@ SPEC CHECKSUMS:
-  GoogleAnalytics-iOS-SDK: bb285d8eef15a682f1b82971becd0d22edd0e53b
+  GoogleAnalytics-iOS-SDK: a3206c68ee5f2a014ed67383d1f779072b653988
@fabiopelosin
Copy link
Member

There is an open issue about this somewhere. However this is cleaner in the description.

@segiddins
Copy link
Member

@kylef is this fixed?

@kylef
Copy link
Contributor Author

kylef commented Sep 11, 2014

I don't think it is.

@fabiopelosin
Copy link
Member

This should have been fixed on master.

@segiddins
Copy link
Member

@fabiopelosin in that case, please add a test case to prove that it is, indeed, fixed

@kylef
Copy link
Contributor Author

kylef commented Sep 13, 2014

This is indeed not fixed in 0.34.0.

$ pod install
Installing Mixpanel 2.5.2 (was 2.5.1)

From 0.34.0, installed via ARAnalyitcs/Mixpanel.

@segiddins
Copy link
Member

@kylef any chance you could write an xit resolver spec for that?

@kylef
Copy link
Contributor Author

kylef commented Sep 14, 2014

The information is correctly stored in the Podfile.lock. It looks like the issue is coming from generate_version_locking_dependencies include the analyzer. It is mapping the pods from the Podfile into the dependencies. Since these dependencies are not in the Podfile, this information is simply lost when getting a list of dependencies.

locking_pods.map do |pod|
  lockfile.dependencies_to_lock_pod_named(pod)
end

@kylef
Copy link
Contributor Author

kylef commented Sep 15, 2014

Here's steps to reproduce (create the following Podfile and Podfile.lock):

platform :ios, '8.0'

pod 'ARAnalytics/Mixpanel'
PODS:
  - ARAnalytics/CoreIOS (2.8.0)
  - ARAnalytics/Mixpanel (2.8.0):
    - ARAnalytics/CoreIOS
    - Mixpanel
  - Mixpanel (2.5.1)

DEPENDENCIES:
  - ARAnalytics/Mixpanel

SPEC CHECKSUMS:
  ARAnalytics: 93c5b65989145f88f4d45e262612eac277b0c219
  Mixpanel: 0115466ba70fd12e67ac4d3d071408dd1d489657

COCOAPODS: 0.34.0.rc1

Run pod install --no-integrate and notice that Mixpanel (2.5.1) gets changed to Mixpanel (2.5.2) in your Podfile.lock.

@segiddins
Copy link
Member

@kylef for some reason, when I write a spec, I'm getting 2.7.2 for ARAnalytics and 2.4.1 for Mixpanel. Any idea why?

segiddins added a commit that referenced this issue Sep 15, 2014
@segiddins segiddins added s3:detailed Issues with in-depth explanations and examples that make it easier to troubleshoot and removed s2:confirmed Issues that have been confirmed by a CocoaPods contributor labels Sep 15, 2014
@segiddins
Copy link
Member

f5701d4 needs to pass in order to close this issue

@fabiopelosin
Copy link
Member

@segiddins the goal is to get rid of disabled tests not to introduce new ones. If you have a solution please commit it, otherwise please share insight in a comment. Disabled tests are decoupled from actual implementation might include logical flaws and they are no better than TODOs.

Also, please respect the appropriate layer of testing. Unit tests should test the logic of the module (in this case the class) they refer to. The resolver doesn't include any logic for version locking dependencies (by design because this is an unrelated task). To verify the interplay between components I would suggest to use the integration layer.

Note: in the past I accepted the PR with the tests related to the optimistic operator even if they are disabled and they are testing a behaviour which is not specifically resolution because you asked for it. However I consider that an exception and I would strongly prefer to keep units tests as noise free as possible.

@fabiopelosin fabiopelosin changed the title CocoaPods is not version locking dependencies of dependencies Lock the version of the dependencies of the Podfile dependencies Sep 15, 2014
@segiddins
Copy link
Member

@fabiopelosin I pushed the disabled spec because this issue really needs to be fixed. Feel free to remove it / move it wherever you think is best.

@segiddins segiddins mentioned this issue Oct 10, 2014
10 tasks
@segiddins segiddins added s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member and removed s3:detailed Issues with in-depth explanations and examples that make it easier to troubleshoot labels Oct 23, 2014
@segiddins segiddins self-assigned this Oct 23, 2014
@segiddins segiddins added this to the 0.35.0 milestone Oct 23, 2014
@segiddins
Copy link
Member

Closed by #2637.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Projects
None yet
Development

No branches or pull requests

3 participants