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
I have some ecto embedded schemas that seems just like structs in all cases except when Maptu calls function_exported?(DB.SQL.Schema.Cart.Loyalty, :__struct__, 0) which returns false. After I instantiate a struct with %DB.SQL.Schema.Cart.Loyalty{} then function_exported?(DB.SQL.Schema.Cart.Loyalty, :__struct__, 0) returns true. However, DB.SQL.Schema.Cart.Loyalty.module_info(:exports) always returns an up to date list of functions.
https://github.com/elixir-lang/elixir/blob/v1.7.3/lib/elixir/lib/kernel.ex#L3245 After reading the documentation for function_exported? It's clear that it doesn't load the code, if it's not already loaded. This makes sense, because it's only happening in my test environment. In any case, I think it would be easier to use Maptu if we can make the change to use module_info or __info__ instead of function_exported?. I'm happy to make a PR, if that would help.
The text was updated successfully, but these errors were encountered:
I have some ecto embedded schemas that seems just like structs in all cases except when
Maptu
callsfunction_exported?(DB.SQL.Schema.Cart.Loyalty, :__struct__, 0)
which returns false. After I instantiate a struct with%DB.SQL.Schema.Cart.Loyalty{}
thenfunction_exported?(DB.SQL.Schema.Cart.Loyalty, :__struct__, 0)
returns true. However,DB.SQL.Schema.Cart.Loyalty.module_info(:exports)
always returns an up to date list of functions.https://github.com/elixir-lang/elixir/blob/v1.7.3/lib/elixir/lib/kernel.ex#L3245 After reading the documentation for
function_exported?
It's clear that it doesn't load the code, if it's not already loaded. This makes sense, because it's only happening in my test environment. In any case, I think it would be easier to useMaptu
if we can make the change to usemodule_info
or__info__
instead offunction_exported?
. I'm happy to make a PR, if that would help.The text was updated successfully, but these errors were encountered: