ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* gem versioning patch doesn't seem to have been applied to HEAD
@ 2008-02-06 18:08 Dave Thomas
  2008-02-08  5:39 ` ara howard
  2008-02-10  8:00 ` Eric Hodel
  0 siblings, 2 replies; 4+ messages in thread
From: Dave Thomas @ 2008-02-06 18:08 UTC (permalink / raw
  To: ruby-core

A while back, I believe that Rich Kilmer created a patch to gems in  
1.9 that fixed the following:

dave[RUBY3/Book 12:05:12] gem list builder

*** LOCAL GEMS ***

builder (2.1.2, 0.1.1)

dave[RUBY3/Book 12:05:16] irb
irb(main):001:0> $:.grep /builder/
=> ["/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-2.1.2/lib"]
irb(main):002:0> gem 'builder', '< 1.0'
=> true
irb(main):003:0> $:.grep /builder/
=> ["/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-2.1.2/lib",  
"/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-0.1.1/lib"]


(The 0.1.1 gem is in the include path _after_ the default, so it won't  
get loaded by a subsequent require)




Dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gem versioning patch doesn't seem to have been applied to HEAD
  2008-02-06 18:08 gem versioning patch doesn't seem to have been applied to HEAD Dave Thomas
@ 2008-02-08  5:39 ` ara howard
  2008-02-19  5:23   ` Richard Kilmer
  2008-02-10  8:00 ` Eric Hodel
  1 sibling, 1 reply; 4+ messages in thread
From: ara howard @ 2008-02-08  5:39 UTC (permalink / raw
  To: ruby-core


On Feb 6, 2008, at 11:08 AM, Dave Thomas wrote:

> A while back, I believe that Rich Kilmer created a patch to gems in  
> 1.9 that fixed the following:
>
> dave[RUBY3/Book 12:05:12] gem list builder
>
> *** LOCAL GEMS ***
>
> builder (2.1.2, 0.1.1)
>
> dave[RUBY3/Book 12:05:16] irb
> irb(main):001:0> $:.grep /builder/
> => ["/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-2.1.2/lib"]
> irb(main):002:0> gem 'builder', '< 1.0'
> => true
> irb(main):003:0> $:.grep /builder/
> => ["/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-2.1.2/ 
> lib", "/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-0.1.1/ 
> lib"]
>
>
> (The 0.1.1 gem is in the include path _after_ the default, so it  
> won't get loaded by a subsequent require)
>
>
>
>
> Dave

i didn't see the patch, but i've had fits with this a few times and  
spoke with eric about it.  the load path is backwards for sure.  a  
larger problem, imho, is that gems is loading libraries by  
manipulating the global load path.  am i the only one that thinks this  
is evil?  just randomly throwing the load path of a gem into the  
global path seems fraught with peril to me...

on a related note though, and fix will break old code that was using  
versioning since the load path will end up completely different - it's  
rather sticky....

a @ http://codeforpeople.com/
--
we can deny everything, except that we have the possibility of being  
better. simply reflect on that.
h.h. the 14th dalai lama

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gem versioning patch doesn't seem to have been applied to HEAD
  2008-02-06 18:08 gem versioning patch doesn't seem to have been applied to HEAD Dave Thomas
  2008-02-08  5:39 ` ara howard
@ 2008-02-10  8:00 ` Eric Hodel
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Hodel @ 2008-02-10  8:00 UTC (permalink / raw
  To: ruby-core

On Feb 6, 2008, at 10:08 AM, Dave Thomas wrote:

> A while back, I believe that Rich Kilmer created a patch to gems in  
> 1.9 that fixed the following:
>
> dave[RUBY3/Book 12:05:12] gem list builder
>
> *** LOCAL GEMS ***
>
> builder (2.1.2, 0.1.1)
>
> dave[RUBY3/Book 12:05:16] irb
> irb(main):001:0> $:.grep /builder/
> => ["/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-2.1.2/lib"]
> irb(main):002:0> gem 'builder', '< 1.0'
> => true
> irb(main):003:0> $:.grep /builder/
> => ["/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-2.1.2/ 
> lib", "/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-0.1.1/ 
> lib"]
>
>
> (The 0.1.1 gem is in the include path _after_ the default, so it  
> won't get loaded by a subsequent require)

Try r15423.  Sorry it took so long.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gem versioning patch doesn't seem to have been applied to HEAD
  2008-02-08  5:39 ` ara howard
@ 2008-02-19  5:23   ` Richard Kilmer
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Kilmer @ 2008-02-19  5:23 UTC (permalink / raw
  To: ruby-core


On Feb 8, 2008, at 12:39 AM, ara howard wrote:

>
> On Feb 6, 2008, at 11:08 AM, Dave Thomas wrote:
>
>> A while back, I believe that Rich Kilmer created a patch to gems in  
>> 1.9 that fixed the following:
>>
>> dave[RUBY3/Book 12:05:12] gem list builder
>>
>> *** LOCAL GEMS ***
>>
>> builder (2.1.2, 0.1.1)
>>
>> dave[RUBY3/Book 12:05:16] irb
>> irb(main):001:0> $:.grep /builder/
>> => ["/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-2.1.2/lib"]
>> irb(main):002:0> gem 'builder', '< 1.0'
>> => true
>> irb(main):003:0> $:.grep /builder/
>> => ["/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-2.1.2/ 
>> lib", "/usr/local/rubybook/lib/ruby/gems/1.9.0/gems/builder-0.1.1/ 
>> lib"]
>>
>>
>> (The 0.1.1 gem is in the include path _after_ the default, so it  
>> won't get loaded by a subsequent require)
>>
>>
>>
>>
>> Dave
>
> i didn't see the patch, but i've had fits with this a few times and  
> spoke with eric about it.  the load path is backwards for sure.  a  
> larger problem, imho, is that gems is loading libraries by  
> manipulating the global load path.  am i the only one that thinks  
> this is evil?  just randomly throwing the load path of a gem into  
> the global path seems fraught with peril to me...

The require/load hack in RubyGems before modified the global load path  
when you loaded a gem.  What this is basically saying is that the  
highest version gem _IS_ part of your load path (again, this is what  
the require/load hack did).  We now just do this explicitly and  
efficiently  up front so we don't have to override require and load  
which was much more evil IMHO.  We now also don't need to load much of  
rubygems  until you explicitly load a Gem of a different version (say  
and earlier version) then it faults in the full gem support.  You can  
always disable it with ruby --disable-gems :-)

-rich

>
>
> on a related note though, and fix will break old code that was using  
> versioning since the load path will end up completely different -  
> it's rather sticky....
>
> a @ http://codeforpeople.com/
> --
> we can deny everything, except that we have the possibility of being  
> better. simply reflect on that.
> h.h. the 14th dalai lama
>
>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-19  5:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-06 18:08 gem versioning patch doesn't seem to have been applied to HEAD Dave Thomas
2008-02-08  5:39 ` ara howard
2008-02-19  5:23   ` Richard Kilmer
2008-02-10  8:00 ` Eric Hodel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).