elixir-cldr / cldr

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

Compilation issue after upgrading ex_cldr 2.37.2 to 2.37.3 #216

Closed simoncocking closed 9 months ago

simoncocking commented 9 months ago

We bumped ex_cldr from 2.37.2 to 2.37.3 this morning, and ran into this:

$ mix deps.compile
.
.
==> ex_cldr
Compiling 1 file (.yrl)
Compiling 1 file (.xrl)
Compiling 2 files (.erl)
Compiling 42 files (.ex)
Generated ex_cldr app
==> ex_cldr_plugs
Compiling 4 files (.ex)
Generated ex_cldr_plugs app
==> ex_cldr_territories
Compiling 3 files (.ex)

== Compilation error in file lib/cldr/territory.ex ==
** (Protocol.UndefinedError) protocol Enumerable not implemented for :AW of type Atom
    (elixir 1.15.4) lib/enum.ex:1: Enumerable.impl_for!/1
    (elixir 1.15.4) lib/enum.ex:166: Enumerable.reduce/3
    (elixir 1.15.4) lib/enum.ex:4387: Enum.map/2
    lib/cldr/territory.ex:16: anonymous fn/1 in :elixir_compiler_27.__MODULE__/1
    (elixir 1.15.4) lib/map.ex:257: Map.do_map/2
    (elixir 1.15.4) lib/map.ex:257: Map.do_map/2
    (elixir 1.15.4) lib/map.ex:251: Map.new_from_map/2
    lib/cldr/territory.ex:14: (module)
could not compile dependency :ex_cldr_territories, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile ex_cldr_territories --force", update it with "mix deps.update ex_cldr_territories" or clean it with "mix deps.clean ex_cldr_territories"

Reverting to 2.37.2 and we're fine.

kipcole9 commented 9 months ago

Wow, completely unexpected and I have no idea how that could even happen given the incredibly minor change I n 2.37.3 which was basically to change only a typespec. Nevertheless, clearly an issue. Since the issue is being surfaced in ex_cldr_territories may I ask you for your use Cldr configuration so I can make to to replicate the same on my side?

kipcole9 commented 9 months ago

I've found the source of the issue, but not yet the commit which caused it. Will fix ASAP.

wkirschbaum commented 9 months ago

@kipcole9 I assume this is related:

  ex_cldr 2.37.3 RETIRED!
    (deprecated) Deprecated
  ex_cldr_calendars 1.22.1

image

kipcole9 commented 9 months ago

Yes, you are correct. An update is coming in the next 30 minutes, it will be ex_cldr version 2.37.4.