elixir-cldr / cldr_dates_times

Date & times formatting functions for the Common Locale Data Repository (CLDR) package https://github.com/elixir-cldr/cldr
Other
68 stars 13 forks source link

updating `cldr_dates_times` leads to some dialyzer warnings #30

Closed alaadahmed closed 2 years ago

alaadahmed commented 2 years ago
Screen Shot 2022-02-21 at 21 05 10
kipcole9 commented 2 years ago

Thanks for the report. Can you show me the offending line in your app that is triggering this?

alaadahmed commented 2 years ago

It is the line where I declare my Cldr module. All 6 warnings refer to that line.

Screen Shot 2022-02-22 at 16 34 01
kipcole9 commented 2 years ago

Thanks, I will take a look in a few hours (in my morning). I always appreciate issues being raised so the library can be improved and made more useful.

If would be tremendously helpful if you could consider pasting text, not pictures. That way I can copy paste whereas with images I end up having to do a lot more work. In addition, including the actual compilation or dialyzer errors (cut/paste from iex/console) also makes debugging a lot more productive and faster.

alaadahmed commented 2 years ago

Ah yes, first time actually I paste screenshot for a warning message, I thought you just need to know what it is about. here is one of them:

The call 'Elixir.Cldr.DateTime.Formatter':literal
         (_@2 :: #{'hour' := _, 'minute' := _, _ => _},
          <<45>>,
          _@1 ::
              #{'__struct__' := 'Elixir.Cldr.LanguageTag',
                'cldr_locale_name' := 'und',
                _ => _},
          'Elixir.AhramSchoolWeb.Cldr',
          _@5 :: any()) breaks the contract 
          (any(),
          'Elixir.String':t(),
          locale(),
          'Elixir.Cldr':backend(),
          map()) ->
             'Elixir.String':t()
kipcole9 commented 2 years ago

So far I'm not able to reproduce.

May I ask you to run mix dialyzer from the command line instead of from within your editor? That will probably produce a more understandable message as well. Please copy/paste the results here so I can keep working on this.

alaadahmed commented 2 years ago

I am closing this, sorry for late reply. I just upgraded cldr_messages to 0.14 and all warnings went away. Thank you very much. 😊