Hello list,

I'm looking at the trunk code trying to solve a series of errors shown
during 'rake test' on Windows.

Solved the segfaults a few hours ago (thanks to Eric to point to
GzipWriter issues) and now I'm facing the following ones:

$ ruby -v -Ilib test\test_gem_commands_update_command.rb

  1) Error:
test_execute(TestGemCommandsUpdateCommand):
NoMethodError: undefined method `size' for nil:NilClass
    ./lib/rubygems/package/tar_reader/entry.rb:84:in `read'
    ./lib/rubygems/specification.rb:609:in `normalize_yaml_input'
    ./lib/rubygems/specification.rb:575:in `from_yaml'
    ./lib/rubygems/package/tar_input.rb:184:in `load_gemspec'
    ./lib/rubygems/package/tar_input.rb:52:in `initialize'
    ./lib/rubygems/package/tar_reader.rb:46:in `each'
    ./lib/rubygems/package/tar_reader.rb:37:in `loop'
    ./lib/rubygems/package/tar_reader.rb:37:in `each'
    ./lib/rubygems/package/tar_input.rb:33:in `initialize'
    ./lib/rubygems/package/tar_input.rb:18:in `new'
    ./lib/rubygems/package/tar_input.rb:18:in `open'
    ./lib/rubygems/package.rb:56:in `open'
    ./lib/rubygems/format.rb:67:in `from_io'
    ./lib/rubygems/format.rb:51:in `from_file_by_path'
    ./lib/rubygems/format.rb:50:in `open'
    ./lib/rubygems/format.rb:50:in `from_file_by_path'
    ./lib/rubygems/installer.rb:81:in `initialize'
    ./lib/rubygems/dependency_installer.rb:184:in `new'
    ./lib/rubygems/dependency_installer.rb:184:in `install'
    ./lib/rubygems/dependency_installer.rb:173:in `each'
    ./lib/rubygems/dependency_installer.rb:173:in `install'
    ./lib/rubygems/commands/update_command.rb:86:in `execute'
    ./lib/rubygems/commands/update_command.rb:82:in `each'
    ./lib/rubygems/commands/update_command.rb:82:in `execute'
    test/test_gem_commands_update_command.rb:31:in `test_execute'
    ./lib/rubygems/user_interaction.rb:45:in `use_ui'
    ./lib/rubygems/user_interaction.rb:27:in `use_ui'
    test/test_gem_commands_update_command.rb:30:in `test_execute'

  2) Error:
test_execute_dependencies(TestGemCommandsUpdateCommand):
Gem::InstallError: invalid gem format for
D:/Temp/test_rubygems_2904/gemhome/cache/c-2.gem
    ./lib/rubygems/installer.rb:83:in `initialize'
    ./lib/rubygems/dependency_installer.rb:184:in `new'
    ./lib/rubygems/dependency_installer.rb:184:in `install'
    ./lib/rubygems/dependency_installer.rb:173:in `each'
    ./lib/rubygems/dependency_installer.rb:173:in `install'
    ./lib/rubygems/commands/update_command.rb:86:in `execute'
    ./lib/rubygems/commands/update_command.rb:82:in `each'
    ./lib/rubygems/commands/update_command.rb:82:in `execute'
    test/test_gem_commands_update_command.rb:93:in `test_execute_dependencies'
    ./lib/rubygems/user_interaction.rb:45:in `use_ui'
    ./lib/rubygems/user_interaction.rb:27:in `use_ui'
    test/test_gem_commands_update_command.rb:92:in `test_execute_dependencies'

  3) Error:
test_execute_named(TestGemCommandsUpdateCommand):
NoMethodError: undefined method `size' for nil:NilClass
    ./lib/rubygems/package/tar_reader/entry.rb:84:in `read'
    ./lib/rubygems/specification.rb:609:in `normalize_yaml_input'
    ./lib/rubygems/specification.rb:575:in `from_yaml'
    ./lib/rubygems/package/tar_input.rb:184:in `load_gemspec'
    ./lib/rubygems/package/tar_input.rb:52:in `initialize'
    ./lib/rubygems/package/tar_reader.rb:46:in `each'
    ./lib/rubygems/package/tar_reader.rb:37:in `loop'
    ./lib/rubygems/package/tar_reader.rb:37:in `each'
    ./lib/rubygems/package/tar_input.rb:33:in `initialize'
    ./lib/rubygems/package/tar_input.rb:18:in `new'
    ./lib/rubygems/package/tar_input.rb:18:in `open'
    ./lib/rubygems/package.rb:56:in `open'
    ./lib/rubygems/format.rb:67:in `from_io'
    ./lib/rubygems/format.rb:51:in `from_file_by_path'
    ./lib/rubygems/format.rb:50:in `open'
    ./lib/rubygems/format.rb:50:in `from_file_by_path'
    ./lib/rubygems/installer.rb:81:in `initialize'
    ./lib/rubygems/dependency_installer.rb:184:in `new'
    ./lib/rubygems/dependency_installer.rb:184:in `install'
    ./lib/rubygems/dependency_installer.rb:173:in `each'
    ./lib/rubygems/dependency_installer.rb:173:in `install'
    ./lib/rubygems/commands/update_command.rb:86:in `execute'
    ./lib/rubygems/commands/update_command.rb:82:in `each'
    ./lib/rubygems/commands/update_command.rb:82:in `execute'
    test/test_gem_commands_update_command.rb:117:in `test_execute_named'
    ./lib/rubygems/user_interaction.rb:45:in `use_ui'
    ./lib/rubygems/user_interaction.rb:27:in `use_ui'
    test/test_gem_commands_update_command.rb:116:in `test_execute_named'

===

Errors 1 and 3 are related to tar_input trying to get #size from a
#read operation over the IO, which returned nil since readed
information was greater than header size:

lib/rubygems/package/tar_reader/entry.rb:78 (#read):

    return nil if @read >= @header.size


But I cannot determine exactly why this is happening (at least, why
this happens on Windows).

Error 2 I think is also related, but on a higher level and the raised
exception is hidden (just a guees).

Any pointers? I'm not familiar with the TarWriter, TarImport and
related Tar handling files.

FYI, there are a few issues with the TestCase helpers that write or
read from files not being opened as binary format (something needed in
Windows for ASCII values outside the printable 127 ones).

Thanks in advance.
-- 
Luis Lavena
Multimedia systems
-
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams
_______________________________________________
Rubygems-developers mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to