elixir-cldr / cldr

Elixir implementation of CLDR/ICU
Other
440 stars 33 forks source link

Silence dialyzer warnings about do_plural_rule #220

Closed Munksgaard closed 9 months ago

Munksgaard commented 9 months ago

Libraries that depend on Cldr might use the :extra_returns feature in dialyzer, which will warn if the typespec of a function specifies return types that are not part of the success typing.

My understanding is that the behavior (and therefore success typing) of do_plural_rule depends/8 on the locale used, so we cannot accurately tell what the correct return type is. Therefore, this commit posits to silence dialyzer warnings about do_plural_rule/8.

Fixes #219

Munksgaard commented 9 months ago

Ideally, we should use :no_extra_return instead of disabling all warnings, but that is not currently possible in elixir, due to this bug.

kipcole9 commented 9 months ago

Sorry for the delay, much appreciated. I will be publishing a new release to hex soon to also ensure Elixir 1.16 there are no warnings.

🥳🥳🥳🥳🥳

kipcole9 commented 9 months ago

I've published ex_cldr version 2.37.5 with the following changelog entry:

Bug Fixes

Thanks again!

Munksgaard commented 9 months ago

No, thank you for the great work you've put into the cldr-project!

kipcole9 commented 9 months ago

Thanks for the kind words Philip, I appreciate it.