beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
47 stars 47 forks source link

Mix dialyzer fails #298

Closed jauggy closed 1 month ago

jauggy commented 2 months ago

Test Steps

Run

mix dialyzer

This does typechecking. You will get this error:

lib/teiserver/helpers/oban_logger.ex:43:call
The function call will not succeed.

System.convert_time_unit(any(), :native, :milliseconds)

breaks the contract
(integer(), time_unit() | :native, time_unit() | :native) :: integer()

Looking at the valid units https://hexdocs.pm/elixir/1.12/System.html#t:time_unit/0

I think it should be :millisecond not :milliseconds

@Beherith this is a file you have worked on recently so it would be good if you can investigate.

StanczakDominik commented 1 month ago

Addressed in #304