pote/gpm

gpm in Dependencies?

leeola opened this issue · 3 comments

Does gpm install a dependence's gpm file? If not, what are your thoughts on this feature?

I realized the other day that if my dependencies also have specific version requirements, i need gpm to satisfy those. I considered writing a plugin for this, but this seems like something that should be core to gpm, in my opinion.

Thoughts?

pote commented

Good question.

Thing is: we can't run different Godeps files at different points in time because they could include different versions of the the same package, so our only option is that the Godeps file in the application covers versions for all packages the dependency tree.

Here's an option though: we could find Godeps files for the dependencies and add their contents to the application Godeps file, maybe highlighting any possible conflicts, we should give that a try with a plugin.

In the end what we should be looking for are ways to help manage a Godeps file and make it as complete as possible, so ideas like this one are definitely worth thinking about!

Yea, i was going to implement it by doing what you suggested - simply record all previous installations and if a duplicate is encountered, ignore it. It's far from perfect, but it atleast gives you the ability to properly install sub-"packages".

Plus, it's mostly trivial to make the root Godeps have priority in the install chain. Meaning that if there are any conflicts the root project can have the final say in what gets installed. Allowing you to try and resolve a potential version conflict yourself, by hopefully finding a common working package version.

I'm not a wiz at bash, but i'll likely toy around the concept in the next few weeks. If i have anything worth sharing, i'll link here.

Thanks for the comments!

pote commented

Thank you for contributing :D

Sounds good, one thing to keep in mind: you don't necessarily need to write the plugin in bash! As long as whatever you do provides an executable called gpm-<something> then gpm will forward gpm <something> commands to it, so if you'd like you can even code it Go or anything else, I'd suggest avoiding anything that needs a runtime (like Ruby, Python) for this since it wouldn't work for people who don't have it, but other than that anything is fair game. :)

Also: whenever we have this available we can add it to the gpm plugins homebrew tap so anyone can install it in a breeze. Just let me know!