edgurgel / verk

A job processing system that just verks! 🧛‍

Home Page:https://hex.pm/packages/verk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Im surely missing something.

juddey opened this issue · comments

Hello,

Just got this deprecation with Elixir 1.8:

warning: deprecated time unit: :seconds. A time unit should be :second, :millisecond, :microsecond, :nanosecond, or a positive integer
  (elixir) lib/calendar/datetime.ex:535: DateTime.to_unix/2
  (verk) lib/verk/schedule_manager.ex:58: Verk.ScheduleManager.handle_info/3
  (stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
  (stdlib) gen_server.erl:711: :gen_server.handle_msg/6
  (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

I was going to create a PR to fix this. so I cloned the repo and ran the tests, but the tests stop with:
2 doctests, 263 tests, 122 failures, 2 excluded.

Heres a failure:

113) test range/0 range (Verk.DeadSetTest)
     test/dead_set_test.exs:127
     ** (CaseClauseError) no case clause matching: {:error, {:compile_forms, {:error, [{[], [{:none, :compile, {:crash, :sys_core_fold, {{:case_clause, {:EXIT, {:function_clause, [{:sys_core_fold, :module, [[{:attribute, 1, :file, {'lib/verk/sorted_set.ex', 1}}, {:attribute, 1, :module, Verk.SortedSet_meck_original}, {:attribute, 1, :compile, [:no_auto_import]}, {:attribute, 174, :spec, {{:requeue_job!, 3}, [{:type, 174, :fun, [{:type, 174, :product, [{:remote_type, ...}, {...}, ...]}, {:type, 174, :boolean, []}]}]}}, {:attribute, 146, :spec, {{:requeue_job, 3}, [{:type, 146, :fun, [{:type, 146, :product, [{...}, ...]}, {:type, 147, :union, [...]}]}]}}, {:attribute, 96, :spec, {{:range_with_score!, 4}, [{:type, 96, :fun, [{:type, 96, :product, [...]}, {:atom, 0, nil}]}]}}, {:attribute, 75, :spec, {{:range_with_score, 4}, [{:type, 75, :fun, [{:type, 75, :product, ...}, {:type, 76, ...}]}]}}, {:attribute, 67, :spec, {{:range!, 4}, [{:type, 67, :fun, [{:type, 67, ...}, {:atom, ...}]}]}}, {:attribute, 55, :spec, {{:range, 4}, [{:type, 55, :fun, [{:type, ...}, {...}]}]}}, {:attribute, 129, :spec, {{:delete_job!, 3}, [{:type, 129, :fun, [{...}, ...]}]}}, {:attribute, 109, :spec, {{:delete_job, 3}, [{:type, 109, :fun, [...]}]}}, {:attribute, 21, :spec, {{:count!, 2}, [{:type, 21, :fun, ...}]}}, {:attribute, 13, :spec, {{:count, 2}, [{:type, 13, ...}]}}, {:attribute, 47, :spec, {{:clear!, 2}, [{:type, ...}]}}, {:attribute, 33, :spec, {{:clear, 2}, [{...}]}}, {:attribute, 1, :export, [__info__: 1, clear: 2, ...]}, {:attribute, 1, :spec, {{...}, ...}}, {:function, 0, :__info__, 1, ...}, {:function, 34, :clear, ...}, {:function, 48, ...}, {:function, ...}, {...}, ...], [:binary, :return_errors, :debug_info, :dialyzer, :no_spawn_compiler_process, :from_core, :no_auto_import]], [file: 'sys_core_fold.erl', line: 109]}, {:compile, :"-select_passes/2-anonymous-2-", 3, [file: 'compile.erl', line: 585]}, {:compile, :"-internal_comp/5-anonymous-1-", 3, [file: 'compile.erl', line: 349]}, {:compile, :fold_comp, 4, [file: 'compile.erl', line: 376]}, {:compile, :internal_comp, 5, [file: 'compile.erl', line: 360]}, {:compile, :"-do_compile/2-anonymous-0-", 2, [file: 'compile.erl', line: 177]}, {:meck_code, :compile_and_load_forms, 2, [file: '/home/justin/projects/elixir/verk/deps/meck/src/meck_code.erl', line: 71]}, {:meck_proc, :backup_original, 3, [file: '/home/justin/projects/elixir/verk/deps/meck/src/meck_proc.erl', line: 363]}, {:meck_proc, :init, 1, [file: '/home/justin/projects/elixir/verk/deps/meck/src/meck_proc.erl', line: 206]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 342]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}}, [{:compile, :"-select_passes/2-anonymous-2-", 3, [file: 'compile.erl', line: 585]}, {:compile, :"-internal_comp/5-anonymous-1-", 3, [file: 'compile.erl', line: 349]}, {:compile, :fold_comp, 4, [file: 'compile.erl', line: 376]}, {:compile, :internal_comp, 5, [file: 'compile.erl', line: 360]}, {:compile, :"-do_compile/2-anonymous-0-", 2, [file: 'compile.erl', line: 177]}, {:meck_code, :compile_and_load_forms, 2, [file: '/home/justin/projects/elixir/verk/deps/meck/src/meck_code.erl', line: 71]}, {:meck_proc, :backup_original, 3, [file: '/home/justin/projects/elixir/verk/deps/meck/src/meck_proc.erl', line: 363]}, {:meck_proc, :init, 1, [file: '/home/justin/projects/elixir/verk/deps/meck/src/meck_proc.erl', line: 206]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 342]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}}]}], []}}}
     code: expect(SortedSet, :range, [key(), 0, -1, Verk.Redis], {:ok, [%{job | original_json: json}]})
     stacktrace:
       /home/justin/projects/elixir/verk/deps/meck/src/meck_proc.erl:113: :meck_proc.set_expect/2
       /home/justin/projects/elixir/verk/deps/meck/src/meck.erl:253: :meck.expect/4
       test/dead_set_test.exs:131: (test)

Running on Ubuntu 16.04 if that makes any difference.

What have I not set up?

Oh hey! Thanks for opening the issue!

TBH I didn't have time to try Elixir 1.8 but it seems like you hit an issue with meck: eproxus/meck#201 . We probably need to use 0.8.13+

Can you try updating meck and check if the tests succeed?

It reminds me that I need to move this project to use Mimic 🤣

Hey, that worked. Just working through removing the deprecations now (in between other stuff).

Closing in favour of #182