fixs: fix dialyzer warning

This commit is contained in:
Zach Daniel 2024-04-23 14:15:25 -04:00
parent 090193f4ca
commit 673cd0312f

View file

@ -344,8 +344,11 @@ defmodule AshPostgres.Repo do
create?: 0,
drop?: 0
# We do this switch because `!@warn_on_missing_ash_functions` in the function body triggers
# a dialyzer error
if @warn_on_missing_ash_functions do
def __after_compile__(_, _) do
if "ash-functions" in installed_extensions() || !@warn_on_missing_ash_functions do
if "ash-functions" in installed_extensions() do
:ok
else
IO.warn("""
@ -382,6 +385,11 @@ defmodule AshPostgres.Repo do
""")
end
end
else
def __after_compile__(_, _) do
:ok
end
end
end
end
end