mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 05:23:18 +12:00
fixs: fix dialyzer warning
This commit is contained in:
parent
090193f4ca
commit
673cd0312f
1 changed files with 43 additions and 35 deletions
10
lib/repo.ex
10
lib/repo.ex
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue