prometheus-ecto icon indicating copy to clipboard operation
prometheus-ecto copied to clipboard

Dialyzer warnings

Open rudigiesler opened this issue 7 years ago • 4 comments

Hi!

I'm getting the following dialyzer warning on Prometheus.EctoInstrumenter:

The call 'Elixir.System':convert_time_unit(_@1::any(),'native','micro_seconds') breaks the contract (integer(),time_unit() | 'native',time_unit() | 'native') -> integer()

Seems like it's unhappy with the first argument in the call to System.convert_time_unit

rudigiesler avatar Sep 12 '18 08:09 rudigiesler

Hi, what is your elixir/dialyxir versions? Can't reproduce here

deadtrickster avatar Sep 16 '18 10:09 deadtrickster

This is with Elixir 1.6.6, OTP 21, and dialyxir 0.5.1, with the unmatched_returns, race_conditions, and underspecs flags.

rudigiesler avatar Sep 17 '18 08:09 rudigiesler

I am seeing similar warnings with:

  • Elixir 1.6.5
  • OTP 20.1
  • dialyzer 1.0.0-rc.3

I think this is related to :micro_seconds being deprecated in more recent Erlang versions. Please see pull request #8 for a fix.

alex-knowles avatar Sep 26 '18 22:09 alex-knowles

still can't reproduce on old commit and on HEAD. Even with the unmatched_returns, race_conditions, and underspecs flags. Mystery

deadtrickster avatar Sep 30 '18 09:09 deadtrickster