kemalcr/kemal-session

Error: no overload matches 'Time.new'

krthr opened this issue · 3 comments

krthr commented
There was a problem expanding macro 'define_storage'

Code in lib/kemal-session/src/kemal-session/engines/memory.cr:52:9

 52 | define_storage({
      ^
Called macro defined in lib/kemal-session/src/kemal-session/engines/memory.cr:7:9

 7 | macro define_storage(vars)

Which expanded to:

 > 22 |
 > 23 |           @ints = Hash(String, Int32).new
 > 24 |           @last_access_at = Time.new.to_unix_ms
                                         ^--
Error: no overload matches 'Time.new'

Overloads are:
 - Time.new(time : LibC::Timespec, location : Location = Location.local)
 - Time.new(pull : JSON::PullParser)
 - Time.new(*, seconds : Int64, nanoseconds : Int32, location : Location)
 - Time.new(*, unsafe_utc_seconds : Int64)

Crystal: 0.34.0

Hi, I've made a pull request #88
I'm not very good at Shards logic, but works for me. Let's wait for one of contributors to merge and improve it.

Can someone merge this, please?