[Rubygems-developers] Specifying a platform

Gavin Sinclair gsinclair at soyabean.com.au
Sun Apr 18 13:09:31 EDT 2004

On Sunday, April 18, 2004, 5:40:24 AM, Chad wrote:

> On 17/4/2004, at 11:54 AM, Gavin Sinclair wrote:

>> On Saturday, April 17, 2004, 11:04:28 PM, Chad wrote:
>>>> There are a few points to make here.
>>>> 1. The error message given there is a bit fearsome.  I'm not sure
>>>> what
>>>>    the current policy on error messages is, but I'm sure this one can
>>>>    be improved.  I'll take advice and then make the change myself.
>>> This is just one of those bad error messages (stack traces) that 
>>> hasn't
>>> yet been cleaned up.
>> Fixed.  I've gone and made all exception classes we create inherit
>> from the new class Gem::Exception.  That makes it possible to catch
>> them separately and generally.
>>>> 2. Why is a platform required?  I understand platform to be "what
>>>> kind
>>>>    of machine this can run on", which is fine, but what does "Ruby"
>>>>    mean as a platform?  If a gem is platform-independent, does a
>>>>    platform need to be specified?  If we must have "Ruby" meaning
>>>>    "platform-independent Ruby-based gem", can it be the default
>>>>    setting?
>>>>    Platform suggests to me a binary gem, I suppose.
>>> RUBY is indeed intended to mean that the gem is cross-platform.  I
>>> think RUBY being a default is a sensible way to go about it.
>> Sounds good.  I agree with Rich's comment elsewhere that Ruby *is* a
>> platform.  So we can treat it as the default platform.
>> But then, what if a gem includes C code as well as Ruby code?  And
>> what if that C code uses, for instance, "fork"?  This platform
>> business might need some more definition.

> This would be a platform-independent source gem, usually.  But you're
> right about the fork() case.  More thought required.

>> If my assumption that an platform specification implies a binary gem
>> is correct (is it?) then a reordering *might* make sense.
>>       wx-windows-0.3.2-mswin.gem
>>       wx-windows-0.3.2-powerpc-darwin.gem
>> I think it's easier to parse and less likely to confuse or conflict,
>> but is it sensible and appealing?

> It might make a little more sense, but the parsing issue shouldn't be
> important.  It *appears* that we would parse file names to get the 
> platforms straight, but we really use the metadata.  We only parse the
> file names as humans.  So, it's probably not too important what order
> they're in.

OK, I think I have finally understood that point now :)  That's good.
I've decided I definitely like wx-windows-0.3.2-powerpc-darwin better
than wx-windows-powerpc-darwin-0.3.2, because it's easier on the eye,
and it follows the "most general to most specific" format.

These will be the names we look at whenever we see a large remote
list, right?  So "easier on the eye" seems like a good thing to me.


More information about the Rubygems-developers mailing list