Cocoapods: Print out pod dependency graph

Created on 27 May 2015  Â·  10Comments  Â·  Source: CocoaPods/CocoaPods

Is there a way to print out a dependency graph of the pods? If not, then this is a feature request ;)

Basically I want to know:

When releasing a new breaking change version (major version change), show me all the pods which are dependent on this pod. This enables me to see all the pods I also need to update because of this breaking change.

I'm asking this because we are using Cocoapods for all our internal components (we have ~70 internal pods, but some of them are small UI components). They are all in our private spec repo.

We also have a common core pod, which holds all kind of helpers we need. Most of the pod are dependent on this one. Now if we releases a new major version of this common core, I want to see all the other pods I need to update, so I can execute pod update in the integrating app again.

Ideally I want to see in which order I need to update those pods and in which order I need to release them. I also want to see which pods can be released in parallel to speed things up and which needs to be in sequential order.

Are there some tools I can use in the meanwhile?

Most helpful comment

You can gem install cocoapods-dependencies and then run pod dependencies :)

All 10 comments

You can gem install cocoapods-dependencies and then run pod dependencies :)

thx, but that gem is not displaying the way I want.

It displays all the pod the current pod is dependent on. (looks into podspec)

what I want is:

Displays all the pod that are dependent on current pod. (needs to look into spec repo)

Example: common has dependency on CocoaLumberjack. Network has dependency on common.

network
^
|
common (current pod)
^
|
CocoaLumberjack

I want it to display network, but not CocoaLumberjack. So I want it to display upwards but not downwards.

You'll need to do you're own logic around Pod::Source in that case

sry I don't know any Ruby and I'm not sure what you mean by Pod::Source

Basically, this is not something CocoaPods provides a builtin solution for, but your more than welcome to build a CocoaPods plugin that does this.

hm ok. can you point me to the right direction where and how i can achieve this? where to start?

I’d start by reading the API docs at http://www.rubydoc.info/gems/cocoapods-core/Pod/Source

On May 28, 2015, at 10:36 AM, Buju77 [email protected] wrote:

hm ok. can you point me to the right direction where and how i can achieve this? where to start?

—
Reply to this email directly or view it on GitHub https://github.com/CocoaPods/CocoaPods/issues/3611#issuecomment-106513473.

I've created a quick-and-dirty implementation of this functionality based on the dependencies-plugin that can be found here: https://github.com/b-ray/cocoapods-dependencies/tree/upwardDownward

If anyone needs it, then i'll create a real cocoapods-plugin out of it?

yes, that was exactly what I was searching for! thx!

Segiddins :: the tool crashes as it can't find integrate_targets

Was this page helpful?
0 / 5 - 0 ratings