You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Cloak.Ecto.Type module does not conform to the Ecto.Type behavior. For example, equal/3 is not implemented.
Because of this, following the cloak_ecto usage instructions results in a custom Ecto type which does not conform to the Ecto.Type behavior. This can result in UndefinedFunctionError instances when Ecto tries to use the custom type in a way that is not implemented:
** (UndefinedFunctionError) function Application.Encrypted.Binary.equal?/2 is undefined or private
I believe either Cloak.Ecto.Type should be updated to use Ecto.Type such that the default implementations can be used as fallbacks, or the usage instructions should be updated to let consumers of use Cloak.Ecto.Binary know that they either need to use Ecto.Type or define the missing methods.
The text was updated successfully, but these errors were encountered:
WilHall
changed the title
Cloak.Ecto.Type does not confirm to the Ecto.Type behavior
Cloak.Ecto.Type does not conform to the Ecto.Type behavior
Oct 8, 2020
The
Cloak.Ecto.Type
module does not conform to theEcto.Type
behavior. For example,equal/3
is not implemented.Because of this, following the
cloak_ecto
usage instructions results in a custom Ecto type which does not conform to theEcto.Type
behavior. This can result inUndefinedFunctionError
instances when Ecto tries to use the custom type in a way that is not implemented:I believe either
Cloak.Ecto.Type
should be updated touse Ecto.Type
such that the default implementations can be used as fallbacks, or the usage instructions should be updated to let consumers ofuse Cloak.Ecto.Binary
know that they either need touse Ecto.Type
or define the missing methods.The text was updated successfully, but these errors were encountered: