fix: deprecation warnings caused by use of Macro.expand_literal/2.

This commit is contained in:
James Harton 2022-10-26 11:00:49 +13:00
parent 2c1802dd69
commit f0e7768e43
3 changed files with 5 additions and 5 deletions

View file

@ -47,7 +47,7 @@ defmodule AshAuthentication.InfoGenerator do
defmacro generate_config_functions(extension, section, prefix?) do defmacro generate_config_functions(extension, section, prefix?) do
options = options =
extension extension
|> Macro.expand_literal(__ENV__) |> Macro.expand_once(__CALLER__)
|> apply(:sections, []) |> apply(:sections, [])
|> Enum.find(&(&1.name == section)) |> Enum.find(&(&1.name == section))
|> Map.get(:schema, []) |> Map.get(:schema, [])
@ -139,7 +139,7 @@ defmodule AshAuthentication.InfoGenerator do
defmacro generate_options_function(extension, section, prefix?) do defmacro generate_options_function(extension, section, prefix?) do
options = options =
extension extension
|> Macro.expand_literal(__ENV__) |> Macro.expand_once(__CALLER__)
|> apply(:sections, []) |> apply(:sections, [])
|> Enum.find(&(&1.name == section)) |> Enum.find(&(&1.name == section))
|> Map.get(:schema, []) |> Map.get(:schema, [])

View file

@ -108,7 +108,7 @@ defmodule AshAuthentication.Plug do
otp_app = otp_app =
opts opts
|> Keyword.fetch!(:otp_app) |> Keyword.fetch!(:otp_app)
|> Macro.expand_literal(__ENV__) |> Macro.expand_once(__CALLER__)
AshAuthentication.Validations.validate_unique_subject_names(otp_app) AshAuthentication.Validations.validate_unique_subject_names(otp_app)

View file

@ -12,12 +12,12 @@ defmodule AshAuthentication.Plug.Router do
otp_app = otp_app =
opts opts
|> Keyword.fetch!(:otp_app) |> Keyword.fetch!(:otp_app)
|> Macro.expand_literal(__ENV__) |> Macro.expand_once(__CALLER__)
return_to = return_to =
opts opts
|> Keyword.fetch!(:return_to) |> Keyword.fetch!(:return_to)
|> Macro.expand_literal(__ENV__) |> Macro.expand_once(__CALLER__)
routes = routes =
otp_app otp_app