Skip to content

Commit

Permalink
Support Elixir 1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Apr 10, 2024
1 parent 11dafbb commit 32113be
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/ecto/migrator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ defmodule Ecto.Migrator do
Migration files should end in .exs. Use "mix ecto.gen.migration" to generate \
migration files with the correct extension.\
""",
file: file
stacktrace_info(file: file)
)

nil
Expand All @@ -699,6 +699,13 @@ defmodule Ecto.Migrator do
end
end

# TODO: Remove when we require Elixir 1.14
if Version.match?(System.version(), ">= 1.14.0") do
defp stacktrace_info(info), do: info
else
defp stacktrace_info(_info), do: []
end

defp ensure_no_duplication!([{version, name, _} | t]) do
cond do
List.keyfind(t, version, 0) ->
Expand Down

0 comments on commit 32113be

Please sign in to comment.