[Rubygems-developers] Dependency Resolution

James Tucker jftucker at gmail.com
Tue Aug 3 05:25:52 EDT 2010

On 2 Aug 2010, at 18:01, Trans wrote:

> Hi--
> I wrote up some code for doing dependency resolution. Right now I am
> using my own Version class to do the constraint comparisons, but it
> shouldn't too hard to adapt to RubyGems'.
> With a bit of tweaking perhaps this can get into the RubyGems?

I'd like to see a runtime dependency tree resolver in RubyGems, but if we are to include one, I would like it to resolve some complex graphs:

 - Cycles
 - Troughs
 - Traps

A completely linear resolver I don't think can do this. You might want to read through the comments in the resolver in bundler, and it's test suite, to see what I'm talking about.

> While I am on the subject, the Gemdo::Version class I'm using can
> handle version constraints in these formats:
>  1.0+   (same as >= 1.0)
>  1.0-    (same as < 1.0)
>  1.0~   (same as ~> 1.0)

I like this, I would say though, adding this could have quite a marked effect on performance with the current design, as Gem::Version is created and parsed all the time.

More information about the Rubygems-developers mailing list