We are trying to upgrade to 1.15.x and running into this issue:
Compiling nnn files (.ex)
warning: invalid association `logs` in schema MyProject.Data.Alert: associated module MyProject.Data.AlertLog is not an Ecto schema
lib/my_project/data/alert.ex:1: MyProject.Data.Alert (module)
Compilation failed due to warnings while using the --warnings-as-errors option
Though the associated module AlertLog
is in fact an Ecto.Schema. Does this have to do with the order in which these files (Alert, AlertLog) appear in Code path?
I tried adding prune_code_paths: false
in mix.exs
and that worked. But the warning in the Changelog for Elixir v1.15 — Elixir v1.15.7 documentation about runtime bug is a big concern.
So, not sure how to resolve this compile time warning/error. Any help/suggestions would be appreciated.