Keep track of the status of the Pods folder #552

Closed
fabiopelosin opened this Issue Sep 24, 2012 · 10 comments

Comments

Projects
None yet
3 participants
Owner

fabiopelosin commented Sep 24, 2012

Assuming that the Podfile and the Podfile.lock are under source control and the Pods folder isn't, it is not possible to understand if the local Pods folder is in sync with the last update or install of the repo without checking manually for commits affecting the Podfile.lock.

A solution would be to keep a local copy of the Podfile.lock (Pods.lock) inside the Pods folder, and compare it with the Podfile.lock. A new subcommand pod status could be introduced that checks those files and if they differ, exits with 1.

This new command could be easily added to in a script to the build phase of the user project.

Owner

alloy commented Sep 24, 2012

Yes, this sounds like a good plan.

Owner

fabiopelosin commented Sep 24, 2012

The ramifications are even deeper. For instance currently we use the Podfile.lock to see if a Pod needs to be reinstalled, but with this change we need should use Pods.lock to see if a pod needs to be installed, and Podfile.lock, to generate the dependencies that lock the resolver to a specific version.

Owner

fabiopelosin commented Feb 23, 2013

Implemented in CP 0.17

Contributor

nikolaykasyanov commented Apr 2, 2013

@irrationalfab is there actually any new subcommand pod status for integration in build script like mentioned in original proposal?

Owner

fabiopelosin commented Apr 2, 2013

No the functionality has not been exposed in a subcommand… what was the use case you were looking for?

Contributor

nikolaykasyanov commented Apr 2, 2013

@irrationalfab I want to add check to build script, and if Podfile.lock and Manifest.lock is different, do pod install.

UPD: I realized that there are many methods to compare two files in shell script :-D

Owner

fabiopelosin commented Apr 2, 2013

I realized that there many methods to compare two files in shell script :-D

This could work, notice thought that it will not pick up changes done to the Podfile.

Contributor

nikolaykasyanov commented Apr 2, 2013

@irrationalfab so there's no way to integrate dependency checking as a build phase?

Owner

fabiopelosin commented Apr 2, 2013

Not, yet… I plan to eventually expose that functionality throughout the pod ipc status subcommand however at the moment there are some issues with the sped of the pod executable (pod --version takes 2s) which would be a deal breaker for such setup.

Contributor

nikolaykasyanov commented Apr 2, 2013

@irrationalfab thanks for the information!

@jzapater jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013

@orta orta Merge pull request #552 from yetithefoot/master
Add YTFPlaceholderTableView
0296c28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment