gemirro icon indicating copy to clipboard operation
gemirro copied to clipboard

Latest_specs contains nil gem

Open hemmrich opened this issue 8 years ago • 3 comments

When indexing the ~730k gems on rubygems.org, the latest_specs.4.8.gz file contains a gem [nil, nil, nil]

irb code:

irb(main):049:0> require 'zlib'
irb(main):050:0> content = Marshal.load(Zlib::GzipReader.open('./latest_specs.4.8.gz').read)
irb(main):051:0> content.each do |elt|
irb(main):052:0> puts elt.inspect if elt[0].nil?
irb(main):053:0> end

output:

[nil, nil, nil]

hemmrich avatar Oct 10 '16 22:10 hemmrich

Hi,

Can you try with rubygems.org/latest_specs.4.8.gz, this file is directly downloading from selected source (rubygems by default).

Regards

PierreRambaud avatar Oct 11 '16 07:10 PierreRambaud

Hey Pierre,

Using rubygems' specs files instead of those created by gemirro index resolves this issue.

Best, Max

hemmrich avatar Oct 11 '16 17:10 hemmrich

Hi,

Sorry I'm not able to reproduce, maybe there are missing check in this method: https://github.com/PierreRambaud/gemirro/blob/master/lib/gemirro/indexer.rb#L181

If you have any idea? Regards

PierreRambaud avatar Oct 18 '16 07:10 PierreRambaud