Closed MMore closed 3 years ago
Bumping this. We are seeing the same warning using ecto 3.6 and ex_audit 0.9. Any suggest resolution here?
I made some changes in #75 and I am using that as a dependency right now until it's in master/main. It's working fine for me.
The world changed a little bit. The state of the master
branch was updated to work with current Ecto versions. Before edge
was used. In master
the approach using the library is different:
defmodule MyApp.Repo do
use Ecto.Repo,
otp_app: :my_app,
adapter: Ecto.Adapters.Postgres
use ExAudit.Repo
end
Before, in edge
it was:
defmodule MyApp.Repo do
use ExAudit.Repo,
otp_app: :my_app,
adapter: Ecto.Adapters.Postgres
end
So now in master
ExAudit isn't replacing the whole Repo anymore but extending it which means features like default_options/1
are available automatically. Not necessary to add it anymore. The only remaining problem was basically a warning which is fixed with #78.
For some more context about the strange merge behaviour of the maintainer, see #75.
Hello,
I've defined in
MyApp.Repo
the functiondefault_options/1
. UnfortunatelyExAudit
prevents overriding that function. At least it's not used. When I replaceby
it's working correctly.
Moreover when compiling the ExAudit dependency I get
warning: conflicting behaviours found. function default_options/1 is required by Ecto.Repo and ExAudit.Repo (in module MyApp.Repo)
.