Incompatible with Crystal 0.25
Closed this issue · 1 comments
zbaylin commented
When requiring kemal-session, the following exception is raised
require "kemal-session"
^
in lib/kemal-session/src/kemal-session.cr:2: while requiring "./kemal-session/*"
require "./kemal-session/*"
^
in lib/kemal-session/src/kemal-session/engine.cr:90: instantiating 'Kemal::Session::GC:Class#new()'
GC.new
^~~
in lib/kemal-session/src/kemal-session/gc.cr:6: instantiating 'loop()'
loop do
^~~~
in lib/kemal-session/src/kemal-session/gc.cr:6: instantiating 'loop()'
loop do
^~~~
in lib/kemal-session/src/kemal-session/gc.cr:7: instantiating 'Kemal::Session::Engine+#run_gc()'
Session.config.engine.run_gc
^~~~~~
in lib/kemal-session/src/kemal-session/engines/file.cr:70: instantiating 'Dir:Class#each_child(String)'
Dir.each_child(@sessions_dir) do |f|
^~~~~~~~~~
in /usr/share/crystal/src/dir.cr:180: instantiating 'Dir:Class#open(String)'
Dir.open(dirname) do |dir|
^~~~
in /usr/share/crystal/src/dir.cr:180: instantiating 'Dir:Class#open(String)'
Dir.open(dirname) do |dir|
^~~~
in /usr/share/crystal/src/dir.cr:181: instantiating 'Dir#each_child()'
dir.each_child do |filename|
^~~~~~~~~~
in /usr/share/crystal/src/dir.cr:181: instantiating 'Dir#each_child()'
dir.each_child do |filename|
^~~~~~~~~~
in lib/kemal-session/src/kemal-session/engines/file.cr:70: instantiating 'Dir:Class#each_child(String)'
Dir.each_child(@sessions_dir) do |f|
^~~~~~~~~~
in lib/kemal-session/src/kemal-session/engines/file.cr:73: undefined method 'stat' for File:Class
age = Time.utc_now - File.stat(full_path).mtime # mtime is always saved in utc
sdogruyol commented
Just released 0.10.0
🕺 https://github.com/kemalcr/kemal-session/releases/tag/v0.10.0