[Rubygems-developers] Specifying equivalent modules?

Charles Oliver Nutter charles.nutter at sun.com
Thu Apr 19 21:34:51 EDT 2007

Eric Hodel wrote:
> On Apr 18, 2007, at 20:43, Charles Oliver Nutter wrote:
>> Eric Hodel wrote:
>>> On Apr 17, 2007, at 22:01, Charles Oliver Nutter wrote:
>>>> I think it's more than just choosing the right platform...it's an
>>>> issue that if every gem out there depends on "mongrel" there's not a
>>>> thing we can do to force them to install and run with "jmongrel",  
>>>> even if
>>>> the two are nearly identical.
>>> No, they'd install the java platformed mongrel, much like there's a
>>> mswin and ruby platformed mysql gem.  Nothing changes in code
>>> anywhere, people running jruby instead install java gems.
>> Well, but that's the point...we have to have a java-platformed  
>> mongrel,
>> which means that Zed, who 'owns' the "mongrel" gem name, would have to
>> be responsible for publishing a Java platform gem.
> So we're really just looking for a technical solution to a social  
> problem.

Not exactly. The problem is that there's no way to provide a jmongrel 
that can be installed wherever mongrel would be installed, even if 
they're compatible. If gem X depends on mongrel, there's no way to 
install it without installing mongrel, even if your platform would need 
jmongrel. You can force it to install and skip all dependencies, but 
that cuts out modules that might otherwise install just fine.

Other package systems handle this by making sure nobody "owns" the name 
for a given package, typically tying dependencies to generic top-level 
names like "perl" or "java". If you depend on "java" it's provided by 
any number of packages like GCJ, Sun or IBM JDKs, and so on. There's no 
equivalent with gems, since dependencies are not specified to a given 
"feature", they're specified to a single specific implementation. 
There's no flexibility for providing that feature with a different 
implementation, unless you can convince the owner of the primary 
implementation to release your code for you. Would it make sense if 
alternative implementations of "java" had to ask Sun to release their 
packages for them?

> Has the author of the java mongrel port asked Zed to be a member of  
> the mongrel project so the port can be distributed from the same  
> project, and the code be kept in one place for maintainability?
> Has Zed refused?

Zed has agreed, and Zed is interested in releasing the code, when he 
gets time and once we've shown how to build it and once we arrange to 
keep it updated on his end and once we figure out testing and release 
procedures from version to version for code he doesn't maintain...

However to have to expect each and every author of a native module to do 
all this is silly. They shouldn't have to do it, and we shouldn't expect 
them to do it. But if jmongrel or anything else is functionally 
equivalent to mongrel under JRuby (and in truth, the only way someone 
running JRuby can run mongrel), there should be a simple way to fit 
jmongrel into the family without having to hassle Zed or anyone else.

- Charlie

More information about the Rubygems-developers mailing list