elixir-cldr/cldr

Compilation issue with Elixir 1.14.0-rc.0

simoncocking opened this issue · 2 comments

Hi,

We're testing Elixir 1.14.0-rc.0 and have run into an apparent issue with ex_cldr. We have:

  • ex_cldr 2.32.1
  • OTP 25.0

and we're hitting the following compilation error:

== Compilation error in file lib/myapp/cldr.ex ==
** (CompileError) lib/cldr/plural_rules/plural_rule.ex:1: undefined function mod/2 (expected MyApp.Cldr.Number.Ordinal to define such a function or for it to be imported, but none are available)
    (ex_cldr 2.32.1) ../umbrella/apps/myapp/lib/myapp/cldr.ex:1: Cldr.Backend.Compiler.__before_compile__/1

Our config:

config :ex_cldr, default_backend: MyApp.Cldr
config :myapp, MyApp.Cldr, default_locale: "en"

Our backend:

defmodule MyApp.Cldr do
  use Cldr,
    locales: ~w[en ja],
    default_locale: "en",
    precompile_number_formats: ["US¤#,###", "A¤#,###"],
    gettext: MyAppWeb.Gettext,
    providers: [Cldr.Number, Cldr.Territory]
end

Compiling under Elixir 1.13.4-otp-25 is fine.

Fixed in ex_cldr version 2.33.0. Sorry for the delay, was on a flight when Elixir 1.14.0-rc.0 was released and I didn't want to publish this release of ex_cldr until then.

Please report back if all is OK for you with this release. I'll hold the issue open until then.

Please report back if all is OK for you with this release.

Hi Kip,

Thanks for the lightning fast response! Confirming that yes, 2.33.0 does resolve the issue. Thanks again!