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

Dialyzer Errors #10

Closed maennchen closed 5 years ago

maennchen commented 5 years ago
lib/cldr/backend/date_time_formatter.ex:117:pattern_match
The pattern can never match the type.

Pattern:
{:error, 95}

Type:
{:error, {_, :datetime_format_lexer, {_, _}}, _}
________________________________________________________________________________
lib/cldr/backend/date_time_formatter.ex:183:call
The function call will not succeed.

Cldr.Substitution.substitute(binary(), [<<71, 77, 84>>, 0])

breaks the contract
([term(), ...], [String.t() | integer(), ...]) :: [term(), ...]
________________________________________________________________________________
lib/cldr/backend/date_time_formatter.ex:183:call
The function call will not succeed.

Cldr.Substitution.substitute(binary(), [<<85, 84, 67>>, 0])

breaks the contract
([term(), ...], [String.t() | integer(), ...]) :: [term(), ...]
________________________________________________________________________________
lib/cldr/backend/date_time_formatter.ex:183:call
The function call will not succeed.

Cldr.Substitution.substitute(binary(), [<<71, 77, 84>>, 0])

breaks the contract
([term(), ...], [String.t() | integer(), ...]) :: [term(), ...]
________________________________________________________________________________
lib/cldr/backend/date_time_formatter.ex:194:call
The function call will not succeed.

Cldr.Substitution.substitute(binary(), [<<71, 77, 84>>, 0])

breaks the contract
([term(), ...], [String.t() | integer(), ...]) :: [term(), ...]
________________________________________________________________________________
lib/cldr/backend/date_time_formatter.ex:194:call
The function call will not succeed.

Cldr.Substitution.substitute(binary(), [<<85, 84, 67>>, 0])

breaks the contract
([term(), ...], [String.t() | integer(), ...]) :: [term(), ...]
________________________________________________________________________________
lib/cldr/backend/date_time_formatter.ex:194:call
The function call will not succeed.

Cldr.Substitution.substitute(binary(), [<<71, 77, 84>>, 0])

breaks the contract
([term(), ...], [String.t() | integer(), ...]) :: [term(), ...]

Installed packages:

ex_cldr_dates_times  2.1.0
ex_cldr_numbers      2.6.4
ex_cldr_units        2.5.1
kipcole9 commented 5 years ago

I apologise, that's sloppy of me. I will work on it this week (I'm going to be out of internet reach for a few days but will work on it).

maennchen commented 5 years ago

@kipcole9 Thanks a lot. Would you be interested in a Travis / Whatever CI you like setup for the CLDR repos?

kipcole9 commented 5 years ago

I actually have a Jenkins server I run my code through but I haven’t enabled dialyzer on it. I've made a lot of progress in my understanding of dialyzer and I think all my other libs are clean now.

I will run dialyzer on my CI server from now as you are very politely suggesting!

Regards, —Kip

On 6 Aug 2019, at 1:17 am, Jonatan Männchen notifications@github.com wrote:

@kipcole9 https://github.com/kipcole9 Thanks a lot. Would you be interested in a Travis / Whatever CI you like setup for the CLDR repos?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/elixir-cldr/cldr_dates_times/issues/10?email_source=notifications&email_token=AAAD4F4HVJRTB2AG7S4OCELQDAR55A5CNFSM4IJJ3RHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3RZAYI#issuecomment-518230113, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAD4F4KY2WKYR4ED2Q75K3QDAR55ANCNFSM4IJJ3RHA.

kipcole9 commented 5 years ago

Sorry this is taking so long, am in a location with no internet until Monday so I'll keep working on this offline and aim to have it resolved early next week.

maennchen commented 5 years ago

@kipcole9 No worries... Thanks for your work!

kipcole9 commented 5 years ago

Published version 2.2.0 which fixes the dialyzer warnings. Note that this version explicitly requires Elixir 1.8 or greater since it relies on Calendar functions not available in earlier releases. This is not a change to the code, just a change to the requirement.

Please note that you will also need to update to ex_cldr version 2.8.1 since I needed to change the @spec for Cldr.Substitution.substitute/2 as well.

I have also checked each of the cldr_* family and confirmed that there are no dialyzer warnings issued. Please do let me know if you see otherwise.

Thanks for keeping me honest on this, and for your feedback and support.