[Rubygems-developers] SourceInfoCache gone, etc. (Was: Problems with trunk ...)

Eric Hodel drbrain at segment7.net
Sun Jun 8 03:58:48 EDT 2008


On Jun 7, 2008, at 23:49 PM, Chad Woolley wrote:
> On Sat, Jun 7, 2008 at 10:20 PM, Eric Hodel <drbrain at segment7.net>  
> wrote:
>> Fixed in 1756.
>>
>> I made Gem::SourceIndex track where it got loaded from, so  
>> #refresh! will
>> always refresh from the same paths.  (It also now raises if the  
>> SourceIndex
>> wasn't created from a directory.)
>
> Thanks.  I'd been trying to debug it, but you are faster :)
>
> Now I'm getting some different errors out of my tests
> (gem_command_manager_spec), like "uninitialized constant
> Gem::SourceInfoCache" (I am clearing it manually in some tests, not
> sure why it's no longer getting required),

SourceInfoCache only gets required if RubyGems hits a source without  
specs.4.8.gz or latest_specs.4.8.gz.  For your tests you'll need to  
require it by hand now.

The new bulk-index-free API is in rubygems/spec_fetcher.rb  
(Gem::SpecFetcher).

> and "source index not created from disk" (not sure what that means).


Gem::SourceIndex#refresh! raises if the SourceIndex wasn't created  
from a spec dir (::from_installed_gems and ::from_gems_in create a  
SourceIndex from a directory).  I added this to prevent future  
occurrences of the error you found in Gem::Server, but I could change  
it back to pulling from the installation dirs like it did before.


More information about the Rubygems-developers mailing list