elixir-cldr / cldr

Elixir implementation of CLDR/ICU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation error when migrationg to 2.28.0

jacmacmod opened this issue · comments

backend file:

defmodule AppWeb.Cldr do
  @moduledoc false

  use Cldr,
    locales: ["ja", "en"],
    gettext: AppWeb.Gettext,
    otp_app: :app_web,
    providers: [Cldr.Calendar, Cldr.DateTime, Cldr.List, Cldr.Number, Cldr.Unit]
end

Screen Shot 2022-04-06 at 14 57 57

@OnigiriJack that error looks like you might not have updated ex_cldr_units to version 3.13.0? Typically is better to configure only the dependant packages in mix.exs and have ex_cldr pulled in as a transitive dependency.

Are you able to share your mix.exs and mix.lock?

Thank you for the quick response. The application is in an umbrella project and cldr is only a dependency in the web application.

  defp deps do
    [
      {:baklava, in_umbrella: true},
      {:cms, in_umbrella: true},
      {:ex_cldr, "~> 2.28.0"},
      {:ex_cldr_dates_times, "~> 2.11.0"},
      {:ex_cldr_lists, "~> 2.10.0"},
      {:ex_cldr_numbers, "~> 2.25.0"},
      {:ex_cldr_units, "~> 3.12.0"},
      {:jason, "~> 1.2"},
    ]
  end
%{
 "ex_cldr": {:hex, :ex_cldr, "2.28.0", "8f7a8c70a49dc31f656eb02d4c6280550ab52abd340406e8341dd4ba2390798d", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:cldr_utils, "~> 2.17", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.19", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "564608c4a344c9cca54874e95fb77cd7149f593ccf522db5cbe8943c0b183630"},
  "ex_cldr_calendars": {:hex, :ex_cldr_calendars, "1.18.0", "aa86e673f02b3c65d9cc29c483a4dfec1878b2e2460619c2b06c121ef801334e", [:mix], [{:calendar_interval, "~> 0.2", [hex: :calendar_interval, repo: "hexpm", optional: true]}, {:ex_cldr_lists, "~> 2.10", [hex: :ex_cldr_lists, repo: "hexpm", optional: true]}, {:ex_cldr_numbers, "~> 2.25", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_cldr_units, "~> 3.12", [hex: :ex_cldr_units, repo: "hexpm", optional: true]}, {:ex_doc, "~> 0.21", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "5b47bf4e90bdd6746ac9ca9cb3f9d36c3e656c18768ace8366061e3e02899cdc"},
  "ex_cldr_currencies": {:hex, :ex_cldr_currencies, "2.13.0", "13188b99e527d724ed3dc2af37e54f0dac42dec42b620a34c4ed4d4902fad6dd", [:mix], [{:ex_cldr, "~> 2.24", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "64731e49ac3530aa88872b52c319eb5231bfb1a3ebb0956044c34abc0ed4f520"},
  "ex_cldr_dates_times": {:hex, :ex_cldr_dates_times, "2.11.0", "eb00d2def8c16feb250ea2436c2e07b31b6e0ad22f9ff569c7714e807c8327df", [:mix], [{:calendar_interval, "~> 0.2", [hex: :calendar_interval, repo: "hexpm", optional: true]}, {:ex_cldr_calendars, "~> 1.18", [hex: :ex_cldr_calendars, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.25", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "36b2dd6bea88f295b9761d6ca26cccce573708cffe6e196f9930a24ca57baecf"},
  "ex_cldr_lists": {:hex, :ex_cldr_lists, "2.10.0", "4d4c9877da2d0417fd832907d69974e8328969f75fafc79b05ccf85f549f6281", [:mix], [{:ex_cldr_numbers, "~> 2.25", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "adc040cde7b97f7fd7c0b35dd69ddb6fcf607303ae6355bb1851deae1f8b0652"},
  "ex_cldr_numbers": {:hex, :ex_cldr_numbers, "2.25.2", "9bd1f21bb7a300e1e0fd080b99f0c912d2adf90292e7d7c0335a6da84758c8a8", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ex_cldr, "~> 2.26", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_currencies, "~> 2.13", [hex: :ex_cldr_currencies, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "5de180d21018797bc412aae727402b3004df4c5666ed2602863448993b035c9b"},
  "ex_cldr_units": {:hex, :ex_cldr_units, "3.12.2", "407e67dc19ee78617332c1ee81c3b0859880b60eccb10a816e918c4848ae1d7a", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ex_cldr_lists, "~> 2.10", [hex: :ex_cldr_lists, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.25", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:ratio, "~> 2.4", [hex: :ratio, repo: "hexpm", optional: false]}], "hexpm", "db09db479e5b9139ef4b890bfc5acc0bcdc421a6b2a679c44ada0a35c63595b3"},
"jason": {:hex, :jason, "1.3.0", "fa6b82a934feb176263ad2df0dbd91bf633d4a46ebfdffea0c8ae82953714946", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "53fc1f51255390e0ec7e50f9cb41e751c260d065dcba2bf0d08dc51a4002c2ac"},
  
  
}

I bumped ex_cldr_numbers to 2.25.0 and ex_cldr_units to 3.12.0. This seemed to fix it.

Glad to hear that @OnigiriJack. I would recommend removing ex_cldr from your def deps() leaving the following (with ex_cldr_numbers at 2.26.0 and ex_cldr_units at 3.13.0):

  defp deps do
    [
      {:baklava, in_umbrella: true},
      {:cms, in_umbrella: true},
      {:ex_cldr_dates_times, "~> 2.11.0"},
      {:ex_cldr_lists, "~> 2.10.0"},
      {:ex_cldr_numbers, "~> 2.26.0"},
      {:ex_cldr_units, "~> 3.13.0"},
      {:jason, "~> 1.2"},
    ]
  end

Thank you that is great advice😇