taylorfinnell / awscr-s3

A Crystal shard for S3.
https://taylorfinnell.github.io/awscr-s3/
MIT License
81 stars 48 forks source link

Error: no overload matches 'Awscr::S3::Part.new', offset: (Float64 | Int32)... #62

Closed joanrega closed 4 years ago

joanrega commented 4 years ago

Hi! I'm using your project to upload files to S3, and I've had no problem thus far, and it is actually working, but when spec tests are thrown at it, I get this error.


In lib/awscr-s3/src/awscr-s3/multipart_file_uploader.cr:46:26

 46 | @pending << Part.new(
                       ^--
Error: no overload matches 'Awscr::S3::Part.new', offset: (Float64 | Int32), size: Int32, number: Int32

Overloads are:
 - Awscr::S3::Part.new(offset : Int32, size : Int32, number : Int32)
Couldn't find overloads for these types:
 - Awscr::S3::Part.new(offset : Float64, size : Int32, number : Int32)

So I've found that apparently the compute_default_part_size function returns the Float64. If I convert the output to an Int32 at line 42 it passes.

I'm sorry for the problems, it's just that to make sure it consistently works I want to check this.

taylorfinnell commented 4 years ago

Hi, what version of the shard and Crystal are you using? I think this was fixed in #57

joanrega commented 4 years ago

Hi, what version of the shard and Crystal are you using? I think this was fixed in #57

Okay, sorry to bother you, it has been a docker configuration problem, getting 0.31 and using 0.5 of your library. I was convinced they set up to a compatible one. Shame on me for not checking that one before. Thank you for your attention and for the library!