[Rubygems-developers] PATCH: respect requirements of gems

Chad Fowler chad at chadfowler.com
Thu Apr 22 05:40:58 EDT 2004

On 22/4/2004, at 3:39 AM, Mauricio Fernández wrote:

> On Wed, Apr 21, 2004 at 09:14:32PM -0400, Chad Fowler wrote:
>> I don't, however, like the idea of gems being responsible for telling
>> us which gems depend on them.  I don't think this is too hard a
>> problem, though.  We can always do something like (I haven't tried to
>> run this yet):
>> def check_dependent_gems(gem_name, gem_version)
>>   dependent = []
>>   Gem::Cache.from_installed_gems.each do { |name, spec|
>>     spec.dependencies.each do |d|
>>       if(d.name == name and d.version == version) then
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The problem is a bit harder than this,

I see that you're right.  I was tired and not thinking straight.

>  due to Rubygems being able
> to install several versions of a lib. at a time, and the fact that
> add_dependency can be used w/o an explicit API version specification.
> IMHO, just like when installing, Rubygems should ensure that the system
> is not left in a broken state when removing packages. I think this
> requires something like
> http://rubyforge.org/pipermail/rubygems-developers/2004-April/ 
> 000296.html

I've thought about this quite a bit, and while I understand what you're  
trying to do and the code is obviously fine, I just can't force myself  
to like this.  I was more open to Eivind's other suggestion of having a  
separate, single, incrementing number for version compatibility, but  
Jim's 1.*.* suggestion still strikes me as being the least offensive.

I guess we now just need an implementation of Jim's concept.


More information about the Rubygems-developers mailing list