Skip to content

Commit

Permalink
Require Elixir v1.7 and fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Mar 10, 2020
1 parent f89a939 commit e5908c0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ jobs:
name: mix test (Elixir ${{ matrix.elixir }} OTP ${{ matrix.otp }})
strategy:
matrix:
elixir: ['1.6.5', '1.9.1']
elixir: ['1.7.4', '1.10.1']
include:
- elixir: '1.6.5'
- elixir: '1.7.4'
otp: '19.x'
- elixir: '1.9.1'
- elixir: '1.10.1'
otp: '22.x'
runs-on: ubuntu-16.04
steps:
Expand Down
2 changes: 1 addition & 1 deletion lib/ecto/changeset.ex
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ defmodule Ecto.Changeset do
module.changeset(struct, params)
rescue
e in UndefinedFunctionError ->
case System.stacktrace() do
case __STACKTRACE__ do
[{^module, :changeset, args_or_arity, _}] when args_or_arity == 2
when length(args_or_arity) == 2 ->
raise ArgumentError, """
Expand Down
4 changes: 2 additions & 2 deletions lib/ecto/query/planner.ex
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ defmodule Ecto.Query.Planner do
rescue
e ->
# Reraise errors so we ignore the planner inner stacktrace
filter_and_reraise e, System.stacktrace()
filter_and_reraise e, __STACKTRACE__
end

@doc """
Expand Down Expand Up @@ -832,7 +832,7 @@ defmodule Ecto.Query.Planner do
rescue
e ->
# Reraise errors so we ignore the planner inner stacktrace
filter_and_reraise e, System.stacktrace()
filter_and_reraise e, __STACKTRACE__
end

defp keep_literals?(%{combinations: combinations}), do: combinations != []
Expand Down
2 changes: 1 addition & 1 deletion lib/ecto/repo/preloader.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defmodule Ecto.Repo.Preloader do
rescue
e ->
# Reraise errors so we ignore the preload inner stacktrace
filter_and_reraise e, System.stacktrace()
filter_and_reraise e, __STACKTRACE__
end

## Preloading
Expand Down
2 changes: 1 addition & 1 deletion lib/mix/ecto.ex
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ defmodule Mix.Ecto do
Mix.Task.run "loadpaths", args

unless "--no-compile" in args do
Mix.Project.compile(args)
Mix.Task.run("compile", args)
end

case Code.ensure_compiled(repo) do
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Ecto.MixProject do
[
app: :ecto,
version: @version,
elixir: "~> 1.6",
elixir: "~> 1.7",
deps: deps(),
consolidate_protocols: Mix.env() != :test,

Expand All @@ -23,7 +23,7 @@ defmodule Ecto.MixProject do

def application do
[
extra_applications: [:logger, :crypto],
extra_applications: [:logger, :crypto, :eex],
mod: {Ecto.Application, []}
]
end
Expand Down

0 comments on commit e5908c0

Please sign in to comment.