[Rubygems-developers] Enhancement Proposal: Would like be able to programatically specify platform
Eric Hodel
drbrain at segment7.net
Thu Nov 30 20:55:01 EST 2006
On Nov 30, 2006, at 1242 , Chad Woolley wrote:
> On 11/30/06, Chad Fowler <chad at chadfowler.com> wrote:
>>
>> We talked about several possibilities, but I think what we settled on
>> is having RubyGems look for a list of matching platforms in best-
>> match
>> order. This would mean the client would have a built-in taxonomy of
>> sorts. We would then allow you to override it via the command
>> line or
>> the gemrc.
>>
>> Thoughts?
>
> Do you mean that it would automatically install based on detecting the
> platform, unless the user overrides it? This seems slightly
> dangerous, because there's the potential of having the wrong gem
> installed.
How so? If they need the win32-mswin version then it is easier to
detect the platform in code from Config::CONFIG than it is for the
user to have to remember (or guess) if they are using ruby built with
the mswin, cygwin or msys compiler (or whatever they are). After
all, this is what computers are for.
> On a related note, I think that the supported platforms are currently
> hardcoded as constants. This may not scale in the future. For
> example, I can imagine different gems for Win XP vs. Vista, or 32 bit
> vs 64 bit. Should the supported platforms be hardcoded, or should the
> gem owner be able to select any arbitrary string for the platform?
New operating systems don't pop up every day. I think we can release
a new version of rubygems (or a separate platforms gem, like the
sources gem) easily enough.
Having written a program to go through the specifications of all the
current gems, there's a lot of crap in there. Allowing users to
arbitrarily specify something will result in no less than 3 strings
that mean the same thing with at least one string specifying two
different things.
--
Eric Hodel - drbrain at segment7.net - http://blog.segment7.net
A: Yes
Q: Is top-posting bad?
— Derek Milhous Zumsteg
More information about the Rubygems-developers
mailing list