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

View file

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

View file

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