From 6a439830abc792ec71dac321b0051d439bca0143 Mon Sep 17 00:00:00 2001 From: Kip Cole Date: Thu, 2 Jan 2020 17:04:54 +0800 Subject: [PATCH] Remove calls to Code.ensure_compiled? since its deprecated in Elixir 1.10 --- .dialyzer_ignore_warnings | 28 +-------------------------- CHANGELOG.md | 10 ++++++++++ lib/money/protocol_implementations.ex | 6 +++--- mix.exs | 4 ++-- mix.lock | 12 ++++++------ 5 files changed, 22 insertions(+), 38 deletions(-) diff --git a/.dialyzer_ignore_warnings b/.dialyzer_ignore_warnings index c9cc610..8b13789 100644 --- a/.dialyzer_ignore_warnings +++ b/.dialyzer_ignore_warnings @@ -1,27 +1 @@ -:0: Unknown function 'Elixir.Cldr.Mixfile':project/0 -:0: Unknown function 'Elixir.Flow':from_enumerable/2 -:0: Unknown function 'Elixir.Flow':map/2 -:0: Unknown function 'Elixir.Gettext.Compiler':expand_to_binary/4 -:0: Unknown function 'Elixir.Gettext.Compiler':warn_if_domain_contains_slashes/1 -:0: Unknown function 'Elixir.Gettext.Extractor':extract/4 -:0: Unknown function 'Elixir.Gettext.Extractor':'extracting?'/0 -:0: Unknown function 'Elixir.Gettext.Interpolation':interpolate/2 -:0: Unknown function 'Elixir.Gettext.Interpolation':to_interpolatable/1 -:0: Unknown function 'Elixir.Mix.Project':config/0 -:0: Unknown function 'Elixir.EEx.Engine':'fetch_assign!'/2 -:0: Unknown function 'Elixir.Mix':shell/0 -:0: Unknown function 'Elixir.Mix.Ecto':ensure_repo/2 -:0: Unknown function 'Elixir.Mix.Ecto':migrations_path/1 -:0: Unknown function 'Elixir.Mix.Ecto':'no_umbrella!'/1 -:0: Unknown function 'Elixir.Mix.Ecto':'open?'/1 -:0: Unknown function 'Elixir.Mix.Ecto':parse_repo/1 -:0: Unknown function 'Elixir.Mix.Generator':create_directory/1 -:0: Unknown function 'Elixir.Mix.Generator':create_file/2 -:0: Unknown function 'Elixir.Mix.Project':app_path/0 -:0: Unknown function 'Elixir.Mix.Task':run/2 -:0: Unknown function 'Elixir.Phoenix.HTML.Safe':to_iodata/1 -lib/mix/tasks/money_postgres_migration.ex:2: Callback info about the 'Elixir.Mix.Task' behaviour is not available -lib/money.ex:1367: Callback info about the 'Elixir.Phoenix.HTML.Safe' behaviour is not available -lib/money/application.ex:48: The variable Vname@1 can never match since previous clauses completely covered the type atom() -lib/money/ecto/money_ecto_composite_type.ex:2: Callback info about the 'Elixir.Ecto.Type' behaviour is not available -lib/money/ecto/money_ecto_map_type.ex:2: Callback info about the 'Elixir.Ecto.Type' behaviour is not available + diff --git a/CHANGELOG.md b/CHANGELOG.md index 9efdb68..0335818 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# Changelog for Money v4.4.2 + +This is the changelog for Money v4.4.2 released on January 2nd, 2019. For older changelogs please consult the release tag on [GitHub](https://github.com/kipcole9/money/tags) + +### Bug Fixes + +* Remove calls to `Code.ensure_compiled?/1` since it is deprecated in Elixir 1.10. Use instead `Cldr.Config.ensure_compiled?/1` which is added as a private API in `Cldr` version 2.12.0. This version of `Cldr` now becomes the minimum version required. + +* Remove spurious entries in `.dialyzer_ignore_warnings` - no entries are required and dialyzer is happy. + # Changelog for Money v4.4.1 This is the changelog for Money v4.4.1 released on November 10th, 2019. For older changelogs please consult the release tag on [GitHub](https://github.com/kipcole9/money/tags) diff --git a/lib/money/protocol_implementations.ex b/lib/money/protocol_implementations.ex index 7c8defc..832a24e 100644 --- a/lib/money/protocol_implementations.ex +++ b/lib/money/protocol_implementations.ex @@ -10,7 +10,7 @@ defimpl Inspect, for: Money do end end -if Code.ensure_compiled?(Jason) do +if Cldr.Config.ensure_compiled?(Jason) do defimpl Jason.Encoder, for: Money do def encode(struct, opts) do struct @@ -20,7 +20,7 @@ if Code.ensure_compiled?(Jason) do end end -if Code.ensure_compiled?(Phoenix.HTML.Safe) do +if Cldr.Config.ensure_compiled?(Phoenix.HTML.Safe) do defimpl Phoenix.HTML.Safe, for: Money do def to_iodata(money) do Phoenix.HTML.Safe.to_iodata(Money.to_string!(money)) @@ -28,7 +28,7 @@ if Code.ensure_compiled?(Phoenix.HTML.Safe) do end end -if Code.ensure_compiled?(Gringotts.Money) do +if Cldr.Config.ensure_compiled?(Gringotts.Money) do defimpl Gringotts.Money, for: Money do def currency(%Money{currency: currency}) do Atom.to_string(currency) diff --git a/mix.exs b/mix.exs index 7340099..76e204c 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Money.Mixfile do use Mix.Project - @version "4.4.1" + @version "4.4.2" def project do [ @@ -82,7 +82,7 @@ defmodule Money.Mixfile do defp deps do [ - {:ex_cldr, "~> 2.6"}, + {:ex_cldr, "~> 2.12"}, {:ex_cldr_numbers, "~> 2.6"}, {:ex_cldr_currencies, "~> 2.4"}, {:decimal, "~> 1.6"}, diff --git a/mix.lock b/mix.lock index f47e2e7..9649174 100644 --- a/mix.lock +++ b/mix.lock @@ -5,16 +5,16 @@ "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm"}, "connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm"}, "db_connection": {:hex, :db_connection, "2.0.6", "bde2f85d047969c5b5800cb8f4b3ed6316c8cb11487afedac4aa5f93fd39abfa", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm"}, - "decimal": {:hex, :decimal, "1.8.0", "ca462e0d885f09a1c5a342dbd7c1dcf27ea63548c65a65e67334f4b61803822e", [:mix], [], "hexpm"}, + "decimal": {:hex, :decimal, "1.8.1", "a4ef3f5f3428bdbc0d35374029ffcf4ede8533536fa79896dd450168d9acdf3c", [:mix], [], "hexpm"}, "deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm"}, "dialyxir": {:hex, :dialyxir, "1.0.0-rc.7", "6287f8f2cb45df8584317a4be1075b8c9b8a69de8eeb82b4d9e6c761cf2664cd", [:mix], [{:erlex, ">= 0.2.5", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm"}, - "earmark": {:hex, :earmark, "1.4.2", "3aa0bd23bc4c61cf2f1e5d752d1bb470560a6f8539974f767a38923bb20e1d7f", [:mix], [], "hexpm"}, + "earmark": {:hex, :earmark, "1.4.3", "364ca2e9710f6bff494117dbbd53880d84bebb692dafc3a78eb50aa3183f2bfd", [:mix], [], "hexpm"}, "ecto": {:hex, :ecto, "3.1.4", "69d852da7a9f04ede725855a35ede48d158ca11a404fe94f8b2fb3b2162cd3c9", [:mix], [{:decimal, "~> 1.6", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"}, "ecto_sql": {:hex, :ecto_sql, "3.1.4", "ac36c453542bae69e93a6882c8448743b2bb353cae3587910e5eb3aa8e96a52d", [:mix], [{:db_connection, "~> 2.0", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.1.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:mariaex, "~> 0.9.1", [hex: :mariaex, repo: "hexpm", optional: true]}, {:myxql, "~> 0.2.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.14.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm"}, "elixir_xml_to_map": {:hex, :elixir_xml_to_map, "0.1.2", "e3d1bd2f6562711117ae209657f385a1c1c34c8c720c748eeba2e22815797071", [:mix], [{:erlsom, "~>1.4", [hex: :erlsom, repo: "hexpm", optional: false]}], "hexpm"}, "erlex": {:hex, :erlex, "0.2.5", "e51132f2f472e13d606d808f0574508eeea2030d487fc002b46ad97e738b0510", [:mix], [], "hexpm"}, "erlsom": {:hex, :erlsom, "1.5.0", "c5a5cdd0ee0e8dca62bcc4b13ff08da24fdefc16ccd8b25282a2fda2ba1be24a", [:rebar3], [], "hexpm"}, - "ex_cldr": {:hex, :ex_cldr, "2.11.1", "8e500a88b68be01a97315bea394d593e74e1035c0a5dc6f0b8281423857ec9b3", [:mix], [{:cldr_utils, "~> 2.3", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.13", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:plug, "~> 1.4", [hex: :plug, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm"}, + "ex_cldr": {:hex, :ex_cldr, "2.12.0", "929204d74537df28147a22b77acf054cb9fee4b11a1dbffbaa6b522750d55396", [:mix], [{:cldr_utils, "~> 2.3", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.13", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:plug, "~> 1.4", [hex: :plug, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm"}, "ex_cldr_currencies": {:hex, :ex_cldr_currencies, "2.4.1", "a8e8330a6d0712b8bb34c5e3759311da1d53fa8bebef163d72615f0ea60c0738", [:mix], [{:ex_cldr, "~> 2.6", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"}, "ex_cldr_numbers": {:hex, :ex_cldr_numbers, "2.9.0", "ffba3ba8cfa41194e57cc38f0cc78f83956ce5c1822b1e4d5f64394cb927ba2c", [:mix], [{:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:ex_cldr, "~> 2.11", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_currencies, "~> 2.3", [hex: :ex_cldr_currencies, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"}, "ex_doc": {:hex, :ex_doc, "0.21.2", "caca5bc28ed7b3bdc0b662f8afe2bee1eedb5c3cf7b322feeeb7c6ebbde089d6", [:mix], [{:earmark, "~> 1.3.3 or ~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"}, @@ -31,7 +31,7 @@ "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm"}, "mime": {:hex, :mime, "1.3.1", "30ce04ab3175b6ad0bdce0035cba77bba68b813d523d1aac73d9781b4d193cf8", [:mix], [], "hexpm"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm"}, - "nimble_parsec": {:hex, :nimble_parsec, "0.5.1", "c90796ecee0289dbb5ad16d3ad06f957b0cd1199769641c961cfe0b97db190e0", [:mix], [], "hexpm"}, + "nimble_parsec": {:hex, :nimble_parsec, "0.5.3", "def21c10a9ed70ce22754fdeea0810dafd53c2db3219a0cd54cf5526377af1c6", [:mix], [], "hexpm"}, "parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm"}, "phoenix_html": {:hex, :phoenix_html, "2.13.3", "850e292ff6e204257f5f9c4c54a8cb1f6fbc16ed53d360c2b780a3d0ba333867", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, "plug": {:hex, :plug, "1.8.3", "12d5f9796dc72e8ac9614e94bda5e51c4c028d0d428e9297650d09e15a684478", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm"}, @@ -42,7 +42,7 @@ "stream_data": {:hex, :stream_data, "0.4.3", "62aafd870caff0849a5057a7ec270fad0eb86889f4d433b937d996de99e3db25", [:mix], [], "hexpm"}, "telemetry": {:hex, :telemetry, "0.4.0", "8339bee3fa8b91cb84d14c2935f8ecf399ccd87301ad6da6b71c09553834b2ab", [:rebar3], [], "hexpm"}, "timex": {:hex, :timex, "3.6.1", "efdf56d0e67a6b956cc57774353b0329c8ab7726766a11547e529357ffdc1d56", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.10", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 0.1.8 or ~> 0.5 or ~> 1.0.0", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm"}, - "tzdata": {:hex, :tzdata, "1.0.2", "6c4242c93332b8590a7979eaf5e11e77d971e579805c44931207e32aa6ad3db1", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm"}, + "tzdata": {:hex, :tzdata, "1.0.3", "73470ad29dde46e350c60a66e6b360d3b99d2d18b74c4c349dbebbc27a09a3eb", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.4.1", "d869e4c68901dd9531385bb0c8c40444ebf624e60b6962d95952775cac5e90cd", [:rebar3], [], "hexpm"}, - "xml_builder": {:hex, :xml_builder, "2.1.1", "2d6d665f09cf1319e3e1c46035755271b414d99ad8615d0bd6f337623e0c885b", [:mix], [], "hexpm"}, + "xml_builder": {:hex, :xml_builder, "2.1.2", "90cb9ad382958934c78c6ddfbe6d385a8ce147d84b61cbfa83ec93a169d0feab", [:mix], [], "hexpm"}, }