Closed gfgs58 closed 3 years ago
Thanks for the report and very sorry for the inconvenience. I recognise the source of the error - which is when CLDR changed some data formats for CLDR 38.1 (which is what ex_cldr 39 is based upon, and does I think have some small changes for the "es" locale).
However when I create a new app with 2.19.0 as a dependency I can't reproduce the error and my test suite is still passing.
mix deps.clean ex_cldr
then mix deps.get
and mix deps.compile
on version 2.19.0?The test app is just ex_cldr and related packages with a copy of your backend. There is no executable code in the app which you can easily verify.
The other thing I can't work out is that I cannot find the string ["feminine"]
in either my repo master branch, or in the test app which downloads the locale files from GitHub.
As a thought, if you are able to search all the json files in your project for that string it might help.
$ grep -l -R "feminine" . ./.elixir_ls/dialyzer_tmp/.elixir_ls/build/_test/lib/circles/ebin/Elixir.Circles.Cldr.Rbnf.Ordinal.beam ./.elixir_ls/dialyzer_tmp/.elixir_ls/build/_test/lib/circles/ebin/Elixir.Circles.Cldr.Rbnf.Spellout.beam ./.elixir_ls/build/_test/lib/circles/ebin/Elixir.Circles.Cldr.Rbnf.Ordinal.beam ./.elixir_ls/build/_test/lib/circles/ebin/Elixir.Circles.Cldr.Rbnf.Spellout.beam ./.elixir_ls/build/_test/lib/ex_cldr/priv/cldr/locales/es.json ./_build/dev/lib/circles/ebin/Elixir.Circles.Cldr.Rbnf.Ordinal.beam ./_build/dev/lib/circles/ebin/Elixir.Circles.Cldr.Rbnf.Spellout.beam ./_build/dev/lib/ex_cldr/priv/cldr/locales/es.json ./deps/ex_cldr_numbers/README.md ./deps/ex_cldr/priv/cldr/locales/es.json
After:
1) mix.exs change back to {:ex_cldr, "~> 2.0"}, 2) mix deps.clean ex_cldr 3) mix deps.get 4) mix deps.update --all 5) mix deps.compile 6) iex -S mix Erlang/OTP 23 [erts-11.0.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Interactive Elixir (1.11.3) - press Ctrl+C to exit (type h() ENTER for help) iex(1)>
No error!
Thanks very much for the collaboration. I think the error was due to an incompatible locale file living in deps/ex_cldr/priv/locales/es.json
. But how the invalid data got there I have no idea. Thats why I think mix deps.clean ex_cldr
did the trick since in :dev
, the locale files are stored in deps
, not _build
.
I will close this issue for now but please do reopen if you find that the issue reoccurs (or of course any other issue!).
After updating dependencies from ex_cldr 2.18.2 to 2.19, this error comes up:
$ iex -S mix Erlang/OTP 23 [erts-11.0.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Compiling 30 files (.ex) Generating MyApp.Cldr for 3 locales named [“en”, “es”, “root”] with a default locale named “en”
== Compilation error in file lib/circles/cldr.ex == ** (ArgumentError) argument error :erlang.binary_to_atom([“feminine”], :utf8) (ex_cldr 2.19.0) lib/cldr/config/config.ex:2108: Cldr.Config.atomize_gender/1 (elixir 1.11.3) lib/enum.ex:1415: anonymous fn/3 in Enum.map/2 (stdlib 3.13.1) maps.erl:233: :maps.fold_1/3 (elixir 1.11.3) lib/enum.ex:2209: Enum.map/2 (ex_cldr 2.19.0) lib/cldr/config/config.ex:2104: Cldr.Config.atomize_gender/1 (ex_cldr 2.19.0) lib/cldr/config/config.ex:2096: anonymous fn/1 in Cldr.Config.group_units/1 (elixir 1.11.3) lib/enum.ex:1197: anonymous fn/4 in Enum.group_by/3 (elixir 1.11.3) lib/enum.ex:2193: Enum."-group_by/3-lists^foldl/2-0-"/3 (ex_cldr 2.19.0) lib/cldr/config/config.ex:2094: Cldr.Config.group_units/1 (ex_cldr 2.19.0) lib/cldr/config/config.ex:2069: anonymous fn/1 in Cldr.Config.structure_units/1 (elixir 1.11.3) lib/enum.ex:1415: anonymous fn/3 in Enum.map/2 (stdlib 3.13.1) maps.erl:233: :maps.fold_1/3 (elixir 1.11.3) lib/enum.ex:2209: Enum.map/2 (ex_cldr 2.19.0) lib/cldr/config/config.ex:2069: Cldr.Config.structure_units/1 (ex_cldr 2.19.0) lib/cldr/config/config.ex:1300: Cldr.Config.do_get_locale/3 (ex_cldr 2.19.0) lib/cldr/compiler_locale_cache.ex:73: Cldr.Locale.Cache.do_get_locale/2 (ex_cldr 2.19.0) lib/cldr/config/config.ex:1896: Cldr.Config.decimal_formats_for/2 (elixir 1.11.3) lib/enum.ex:1411: Enum."-map/2-lists^map/1-0-"/2 (elixir 1.11.3) lib/enum.ex:1411: Enum."-map/2-lists^map/1-0-"/2