diff --git a/CHANGELOG.md b/CHANGELOG.md index 98b50082bde..80317c57ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,16 @@ * Deprecations * [File] `File.stream_to!/3` is deprecated + * [GenFSM] `GenFSM` is deprecated * [Kernel] `%` for sigils is deprecated in favor of `~` * [Kernel] `is_range/1` and `is_regex/1` are deprecated in favor of `Range.range?/1` and `Regex.regex?/1` * [Stream] `Stream.after/1` is deprecated * [URI] `URI.decode_query/1` is deprecated in favor of `URI.decode_query/2` with explicit dict argument * [URI] Passing lists as key or values in `URI.encode_query/1` is deprecated +* Backwards incompatible changes + * [Mix] Remove `MIX_GIT_FORCE_HTTPS` as Git itself already provides mechanisms for doing so + # v0.12.4 (2014-02-12) * Enhancements diff --git a/lib/elixir/lib/gen_fsm/behaviour.ex b/lib/elixir/lib/gen_fsm/behaviour.ex index d377241c38c..ddd5d91b96c 100644 --- a/lib/elixir/lib/gen_fsm/behaviour.ex +++ b/lib/elixir/lib/gen_fsm/behaviour.ex @@ -166,6 +166,8 @@ defmodule GenFSM.Behaviour do @doc false defmacro __using__(_) do quote location: :keep do + IO.puts :stderr, "warning: GenFSM is deprecated and it will be removed in upcoming releases\n#{Exception.format_stacktrace}" + @behaviour :gen_fsm @doc false diff --git a/lib/elixir/test/elixir/gen_fsm/behaviour_test.exs b/lib/elixir/test/elixir/gen_fsm/behaviour_test.exs deleted file mode 100644 index ec39e1986b0..00000000000 --- a/lib/elixir/test/elixir/gen_fsm/behaviour_test.exs +++ /dev/null @@ -1,43 +0,0 @@ -Code.require_file "../test_helper.exs", __DIR__ - -defmodule GenFSM.BehaviourTest do - use ExUnit.Case - - setup_all do - :error_logger.tty(false) - :ok - end - - teardown_all do - :error_logger.tty(true) - :ok - end - - defmodule Sample do - use GenFSM.Behaviour - - def init(args) do - { :ok, :sample, args } - end - end - - test "sync event stops server on unknown requests" do - Process.flag(:trap_exit, true) - assert { :ok, pid } = :gen_fsm.start_link(Sample, [:hello], []) - - catch_exit(:gen_fsm.sync_send_all_state_event(pid, :unknown_request)) - assert_receive { :EXIT, ^pid, {:bad_sync_event, :sample, :unknown_request} } - after - Process.flag(:trap_exit, false) - end - - test "event stops server on unknown requests" do - Process.flag(:trap_exit, true) - assert { :ok, pid } = :gen_fsm.start_link(Sample, [:hello], []) - - :gen_fsm.send_all_state_event(pid, :unknown_request) - assert_receive { :EXIT, ^pid, {:bad_event, :sample, :unknown_request} } - after - Process.flag(:trap_exit, false) - end -end