__schema__(:autogenerate_fields) doesn't existe for Ecto versions 3.9.4
Closed this issue · 4 comments
Hi,
Regarding the following line, it seems function __schema__(:autogenerate_fields)
will never pattern match as it's not defined in ecto 3.9.5 neigter in 3.9.4
https://github.com/zachallaun/mneme/blob/main/lib/mneme/assertion/pattern_builder.ex#L255
see
- https://github.com/elixir-ecto/ecto/blob/v3.9.5/lib/ecto/schema.ex#L632
- https://github.com/elixir-ecto/ecto/blob/v3.9.4/lib/ecto/schema.ex#L632
But it exists on master branch (https://github.com/elixir-ecto/ecto/blob/master/lib/ecto/schema.ex)
Seems we should use in this case __schema__(:autogenerate)
.
What do you think ?
Regards
Thank you for pointing this out. This is my mistake -- I contributed the __schema__(:autogenerate_fields)
functionality a couple of months ago and incorrectly assumed it would make it into the 3.9.5
release, but it seems like it will actually be 3.10.0
. I will update the check to look for >= 3.10.0
.
If you have a moment and could confirm that everything works as expected when using main
, I would greatly appreciate it!
defp deps do
[
{:mneme, github: "zachallaun/mneme", only: :test}
]
end
🎉 It works as expected, thank you ! 🎉
Thank you for confirming! I'll have a release out including that fix in the next few days.