When using polymorphic_embeds_one and polymorphic_embeds_many this library creates compile time dependencies between the parent module and the polymorphic embed modules. This causes huge dependency graphs in which changing a file requires a recompilation of many others.
This same problem existed in Ecto some time ago as reported in elixir-ecto/ecto#1610. The Ecto team fixed this by disabling the lexical tracker for the association modules as shown in elixir-ecto/ecto#1670.
Given that Polymorphic Embed aims to mimic Ecto's embeds_one and embeds_many. Would it make sense to use the same approach as Ecto did to fix this issue?
When using
polymorphic_embeds_one
andpolymorphic_embeds_many
this library creates compile time dependencies between the parent module and the polymorphic embed modules. This causes huge dependency graphs in which changing a file requires a recompilation of many others.This same problem existed in Ecto some time ago as reported in elixir-ecto/ecto#1610. The Ecto team fixed this by disabling the lexical tracker for the association modules as shown in elixir-ecto/ecto#1670.
Given that Polymorphic Embed aims to mimic Ecto's
embeds_one
andembeds_many
. Would it make sense to use the same approach as Ecto did to fix this issue?