diff options
-rw-r--r-- | lib/elixir/lib/enum.ex | 2 | ||||
-rw-r--r-- | lib/elixir/lib/float.ex | 4 | ||||
-rw-r--r-- | lib/elixir/lib/stream.ex | 2 | ||||
-rw-r--r-- | lib/elixir/test/elixir/kernel/typespec_test.exs | 2 | ||||
-rw-r--r-- | lib/elixir/test/elixir/stream_test.exs | 6 | ||||
-rw-r--r-- | lib/mix/lib/mix/tasks/new.ex | 3 | ||||
-rw-r--r-- | lib/mix/lib/mix/utils.ex | 8 |
7 files changed, 11 insertions, 16 deletions
diff --git a/lib/elixir/lib/enum.ex b/lib/elixir/lib/enum.ex index 35797277b..e7752be51 100644 --- a/lib/elixir/lib/enum.ex +++ b/lib/elixir/lib/enum.ex @@ -2450,8 +2450,8 @@ defmodule Enum do end @doc false - # TODO: Deprecate by 1.4 def uniq(enumerable, fun) do + IO.warn "Enum.uniq/2 is deprecated, use Enum.uniq_by/2 instead" uniq_by(enumerable, fun) end diff --git a/lib/elixir/lib/float.ex b/lib/elixir/lib/float.ex index 7ec9bbc39..fd3a2806a 100644 --- a/lib/elixir/lib/float.ex +++ b/lib/elixir/lib/float.ex @@ -214,15 +214,15 @@ defmodule Float do @doc false def to_char_list(float), do: Float.to_charlist(float) - # TODO: Deprecate by v1.4 @doc false def to_char_list(float, options) do + IO.warn "Float.to_char_list/2 is deprecated, use :erlang.float_to_list/2 instead" :erlang.float_to_list(float, expand_compact(options)) end - # TODO: Deprecate by v1.4 @doc false def to_string(float, options) do + IO.warn "Float.to_string/2 is deprecated, use :erlang.float_to_binary/2 instead" :erlang.float_to_binary(float, expand_compact(options)) end diff --git a/lib/elixir/lib/stream.ex b/lib/elixir/lib/stream.ex index 12bb616fd..8212cc040 100644 --- a/lib/elixir/lib/stream.ex +++ b/lib/elixir/lib/stream.ex @@ -844,8 +844,8 @@ defmodule Stream do end @doc false - # TODO: Deprecate by 1.4 def uniq(enum, fun) do + IO.warn "Stream.uniq/2 is deprecated, use Stream.uniq_by/2 instead" uniq_by(enum, fun) end diff --git a/lib/elixir/test/elixir/kernel/typespec_test.exs b/lib/elixir/test/elixir/kernel/typespec_test.exs index 7a002a936..9bebee7e6 100644 --- a/lib/elixir/test/elixir/kernel/typespec_test.exs +++ b/lib/elixir/test/elixir/kernel/typespec_test.exs @@ -1,7 +1,7 @@ Code.require_file "../test_helper.exs", __DIR__ defmodule Kernel.TypespecTest do - use ExUnit.Case, async: true + use ExUnit.Case alias Kernel.TypespecTest.TestTypespec diff --git a/lib/elixir/test/elixir/stream_test.exs b/lib/elixir/test/elixir/stream_test.exs index 7d18be9ef..38cdf8fdb 100644 --- a/lib/elixir/test/elixir/stream_test.exs +++ b/lib/elixir/test/elixir/stream_test.exs @@ -866,11 +866,7 @@ defmodule StreamTest do end test "uniq/1 & uniq/2" do - assert Stream.uniq([1, 2, 3, 2, 1]) |> Enum.to_list == - [1, 2, 3] - - assert Stream.uniq([{1, :x}, {2, :y}, {1, :z}], fn {x, _} -> x end) |> Enum.to_list == - [{1, :x}, {2, :y}] + assert Stream.uniq([1, 2, 3, 2, 1]) |> Enum.to_list == [1, 2, 3] end test "uniq_by/2" do diff --git a/lib/mix/lib/mix/tasks/new.ex b/lib/mix/lib/mix/tasks/new.ex index 1f162f5a0..3defbeed8 100644 --- a/lib/mix/lib/mix/tasks/new.ex +++ b/lib/mix/lib/mix/tasks/new.ex @@ -2,7 +2,6 @@ defmodule Mix.Tasks.New do use Mix.Task import Mix.Generator - import Mix.Utils, only: [camelize: 1] @shortdoc "Creates a new Elixir project" @@ -55,7 +54,7 @@ defmodule Mix.Tasks.New do [path | _] -> app = opts[:app] || Path.basename(Path.expand(path)) check_application_name!(app, !!opts[:app]) - mod = opts[:module] || camelize(app) + mod = opts[:module] || Macro.camelize(app) check_mod_name_validity!(mod) check_mod_name_availability!(mod) File.mkdir_p!(path) diff --git a/lib/mix/lib/mix/utils.ex b/lib/mix/lib/mix/utils.ex index 8d2ab5d74..ce6cbdd30 100644 --- a/lib/mix/lib/mix/utils.ex +++ b/lib/mix/lib/mix/utils.ex @@ -236,14 +236,14 @@ defmodule Mix.Utils do end @doc false - # TODO: Deprecate by 1.4 def underscore(value) do + IO.warn "Mix.Utils.underscore/1 is deprecated, use Macro.underscore/1 instead" Macro.underscore(value) end @doc false - # TODO: Deprecate by 1.4 def camelize(value) do + IO.warn "Mix.Utils.camelize/1 is deprecated, use Macro.camelize/1 instead" Macro.camelize(value) end @@ -273,7 +273,7 @@ defmodule Mix.Utils do |> to_string() |> String.split(".") |> Enum.drop(nesting) - |> Enum.map_join(".", &underscore/1) + |> Enum.map_join(".", &Macro.underscore/1) end @doc """ @@ -289,7 +289,7 @@ defmodule Mix.Utils do command |> to_string() |> String.split(".") - |> Enum.map_join(".", &camelize/1) + |> Enum.map_join(".", &Macro.camelize/1) end @doc """ |