Getting IO+ type errors when running Zip tests

I’m trying to integrate my Zip64 work into the Zip module in stdlib. As per https://github.com/crystal-lang/crystal/issues/7103 I did a checkout and wrote a small shell script to help me along

set -e
export PATH="/usr/local/opt/llvm@6/bin:$PATH"
make deps
bin/crystal spec spec/std/zip/zip_serializer_spec.cr
bin/crystal spec spec/std/zip/zip_spec.cr

I did the requisite changes but I am getting a compiler error when attempting to run the tests:

in src/zip/writer.cr:197: no overload matches 'Zip::Serializer#write_central_directory_file_header', io: IO+, filename: String, compressed_size: String, uncompressed_size: UInt64, crc32: UInt32, gp_flags: UInt16, mtime: Time, storage_mode: Int32, local_file_header_location: UInt64
Overloads are:
 - Zip::Serializer#write_central_directory_file_header(io : IO, filename : String, compressed_size : ZipFilesize, uncompressed_size : ZipFilesize, crc32 : ZipCRC32, gp_flags : ZipGpFlags, mtime : Time, storage_mode : ZipStorageMode, local_file_header_location : ZipLocation)

      @written += @serializer.write_central_directory_file_header(io: @io,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So for some reason I get an IO+ type specifier for this method call, and I don’t even know what IO+ means in this context. The IO is also apparently IO::ARGF in this case, which it should not be.

in src/zip/writer.cr:197: undefined method 'to_io' for IO::ARGF (compile-time type is IO+)

      @written += @serializer.write_central_directory_file_header(io: @io.to_io,

It does seem this is way above my league as all I could find for a similar error was this:
https://irclog.whitequark.org/crystal-lang/2018-04-21

which mentions

it’s very annoying to have this error undefined method 'next_byte' for IO::ARGF (compile-time type is IO+) evhen when I don’t use an IO::ARGF

Any pointers on how to proceed would be appreciated

It seems you are passing a String to compressed_size

Yep, good catch. Already fixed and PR opened ;-)