vectordotdev / timber-elixir

🌲 Great Elixir logging made easy
https://timber.io
Other
214 stars 29 forks source link

Timber.add_context wrong typespec #348

Open gabrielpra1 opened 5 years ago

gabrielpra1 commented 5 years ago

Timber.add_context has the typespec @spec add_context(map()) :: :ok, even though the function also accepts a keyword list as parameter.

This causes Dialyzer to throw misleading warnings:

The call 'Elixir.Timber':add_context([{'origin','tracker'},...]) will never return since the success typing is (map()) -> 'ok' and the contract is (map()) -> 'ok'