From 5083dd386fa876fac59bce2d1325e5e94c338e4f Mon Sep 17 00:00:00 2001 From: Andrea Leopardi Date: Thu, 1 Dec 2016 08:56:16 +0100 Subject: [PATCH] Hard-deprecate the Set module It will be removed in Elixir 2.0. --- lib/elixir/lib/set.ex | 4 +++- lib/elixir/src/elixir_dispatch.erl | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/elixir/lib/set.ex b/lib/elixir/lib/set.ex index 3e1f8673380..2fa95e45e04 100644 --- a/lib/elixir/lib/set.ex +++ b/lib/elixir/lib/set.ex @@ -9,7 +9,9 @@ defmodule Set do @type values :: [ value ] @type t :: map - # TODO: Deprecate every function by 1.4 + # TODO: Remove by 2.0 + # (hard-deprecated in elixir_dispatch) + defmacrop target(set) do quote do case unquote(set) do diff --git a/lib/elixir/src/elixir_dispatch.erl b/lib/elixir/src/elixir_dispatch.erl index be5febcc3c0..9002d83d38b 100644 --- a/lib/elixir/src/elixir_dispatch.erl +++ b/lib/elixir/src/elixir_dispatch.erl @@ -354,6 +354,8 @@ deprecation('Elixir.HashSet', _, _) -> "use the MapSet module instead"; deprecation('Elixir.Dict', _, _) -> "use the Map module for working with maps or the Keyword module for working with keyword lists"; +deprecation('Elixir.Set', _, _) -> + "use the MapSet module for working with sets"; %% Single functions deprecation('Elixir.String', strip, 1) ->