Hello all,
I have an issue that I’ve been unable to reproduce on a smaller scale. For certain files, when I change them and run mix compile, I get a compiler deadlock on a circular dependency. This is after introducing behavior to dynamically generate ecto associations. We do this because we will often use views that are sourced from the same table (so they relate in the same way) but contain different data and derive different data. So in our schema we would say something like:
schema "posts" do
field :title, :string
field :content, :string
Comment.Versions.for_all_versions(fn version_name, version_schema ->
has_many version_name, version_schema, foreign_key: :post_id
end)
end
Does anyone know of anything that might cause this behavior? To me, getting a deadlock on a file change but not when running a mix compile --force implies that some module somewhere doesn’t know about a dependency it has.
Thanks!






















