Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Im surely missing something. #181

Closed
juddey opened this issue Jan 30, 2019 · 4 comments
Closed

Im surely missing something. #181

juddey opened this issue Jan 30, 2019 · 4 comments

Comments

@juddey
Copy link
Contributor

juddey commented Jan 30, 2019

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?

@edgurgel
Copy link
Owner

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?

@edgurgel
Copy link
Owner

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

@juddey
Copy link
Contributor Author

juddey commented Jan 30, 2019

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

@juddey
Copy link
Contributor Author

juddey commented Jan 30, 2019

Closing in favour of #182

@juddey juddey closed this as completed Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants