Skip to content

Commit 1c1c272

Browse files
authored
Merge pull request #4 from mixi-m/work/support-elixir-1.18
Suppress warnings in elixir 1.18
2 parents 4f7c3e0 + 191b051 commit 1c1c272

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
include:
15-
- elixir: 1.17.x
15+
- elixir: 1.18.x
1616
otp: 27.x
1717
lint: true
18+
- elixir: 1.17.x
19+
otp: 27.x
1820
- elixir: 1.17.x
1921
otp: 25.x
2022
- elixir: 1.16.x

lib/params/def.ex

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ defmodule Params.Def do
1313
Code.eval_quoted(block, [], __ENV__)
1414
end
1515

16-
Module.eval_quoted(
17-
__MODULE__,
16+
Code.eval_quoted(
1817
quote do
1918
def unquote(name)(params, options \\ []) do
2019
unquote(module_name).from(params, options)
2120
end
22-
end
21+
end,
22+
[],
23+
module: __MODULE__
2324
)
2425
end
2526
end
@@ -33,13 +34,14 @@ defmodule Params.Def do
3334
Params.Def.defschema(schema)
3435
end
3536

36-
Module.eval_quoted(
37-
__MODULE__,
37+
Code.eval_quoted(
3838
quote do
3939
def unquote(name)(params) do
4040
unquote(module_name).from(params)
4141
end
42-
end
42+
end,
43+
[],
44+
module: __MODULE__
4345
)
4446
end
4547
end
@@ -48,7 +50,7 @@ defmodule Params.Def do
4850
defmacro defschema(schema) do
4951
quote bind_quoted: [schema: schema] do
5052
normalized_schema = Params.Def.normalize_schema(schema, __MODULE__)
51-
Module.eval_quoted(__MODULE__, Params.Def.gen_root_schema(normalized_schema))
53+
Code.eval_quoted(Params.Def.gen_root_schema(normalized_schema), [], module: __MODULE__)
5254

5355
normalized_schema
5456
|> Params.Def.build_nested_schemas()

0 commit comments

Comments
 (0)