elixir-cldr / cldr_calendars

Calendar functions for CLDR
Other
15 stars 6 forks source link

Compilation error after mix deps.update #21

Closed WernerBuchert closed 5 months ago

WernerBuchert commented 5 months ago

Good morning,

i have a phoenix project and i'm using Elixir 1.16.2 (compiled with Erlang/OTP 26). After calling "mix deps.update -all" there was an upgrade:

ex_cldr_calendars 1.23.1 => 1.24.0

Now my project doesn't compile anymore, there seems to be a bug:

error: Duration.struct/0 is undefined, cannot expand struct Duration. Make sure the struct name is correct. If the struct name exists and is correct but it still cannot be found, you likely have cyclic module usage in your code │ 2902 │ defp shift_date_options(%Duration{ │ ^ │ └─ lib/cldr/calendar.ex:2902:27: Cldr.Calendar.shift_date_options/1

== Compilation error in file lib/cldr/calendar.ex == ** (CompileError) lib/cldr/calendar.ex: cannot compile module Cldr.Calendar (errors have been logged) lib/cldr/calendar.ex:2902: (module)

Thanks for your library! Best regards, Werner.

kipcole9 commented 5 months ago

Ouch, sorry for that. Duration.t is an Elixir 1.17 specific struct. But I have conditional compilation that should be working on other releases. I’ll check this out right away and revert asap.

kipcole9 commented 5 months ago

I've published ex_cldr_calendars version 1.24.1 with the following changeling entry:

Bug Fixes

Thanks again for the report and apologies for this morning's inconvenience.