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

Reverse dependencies #193

Open
kablamo opened this issue Mar 3, 2015 · 6 comments
Open

Reverse dependencies #193

kablamo opened this issue Mar 3, 2015 · 6 comments

Comments

@kablamo
Copy link

kablamo commented Mar 3, 2015

Hi, I'd like a command that shows me the reverse dependencies for a pkg. Specifically: something that is the intersection of CPAN::ReverseDependencies and pinto list.

Do you think it makes sense to add a subcommand to pinto for that? Or should I make this a separate pkg on cpan?

@thaljef
Copy link
Owner

thaljef commented Mar 3, 2015

That sounds like a fantastic idea! Why don't you start by forking Pinto. Once it takes a bit more shape, then we can decide if we want it in the core. If you haven't already figured this out, there are two basic parts for any command:

  1. An App::Pinto::Command subclass (the user interface)
  2. A Pinto::Action subclass (the implementation)

Use the code for existing commands as a starting point. Certain commands may also require a Pinto::Remote::Action subclass, but I don't think you'll need one in this case. I am happy to help, and @tartansandal may also have some insights on writing your first Pinto command.

@thaljef
Copy link
Owner

thaljef commented Mar 3, 2015

If I may make a suggestion, the same command could also report forward-dependencies too. I think Pinto::PrerequisiteWalker might be helpful here.

@kahlil-hodgson
Copy link
Contributor

Excellent idea! Happy to give pointers if you are interested in this :-)

@kablamo
Copy link
Author

kablamo commented Mar 17, 2015

Spent some time looking into this. It is kind of a lot of work. The first step is I need to patch CPAN::ReverseDependencies to add some features. For example:

  1. Need a way to get > 100 results.
  2. Need a way to get query a specific release instead of always looking at the latest version

That last one in particular might be a problem. If the local stack has a version pinned, the reverse dep might not apply.

@thaljef
Copy link
Owner

thaljef commented Mar 24, 2015

@kablamo I don't think you need CPAN::ReverseDependencies at all (if I understand your intentions correctly). Pinto already knows the whole dependency tree for everything in the repository. You just have to walk the tree and print stuff out.

@kablamo
Copy link
Author

kablamo commented Mar 24, 2015

@thaljef thanks for pointing that out. Not sure what I was thinking. Thats obvious in retrospect. I'll take a look again when I get a chance.

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

3 participants