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
Currently Ecto.Repo.Supervisor.compile_config/2 uses Code.ensure_loaded?/1 which is fine in most cases, when the adapter lives elsewhere, and would possibly have been compiled already as part of a dependency. But this can be wobbly when both the Repo and the Adapter it refers to are in the same OTP app. When I do this and repeatedly run mix compile on a machine with 8 cores, this fails 50% of the time but never fails during the first compilation pass after running mix clean.
Current behaviour
Currently
Ecto.Repo.Supervisor.compile_config/2
usesCode.ensure_loaded?/1
which is fine in most cases, when the adapter lives elsewhere, and would possibly have been compiled already as part of a dependency. But this can be wobbly when both the Repo and the Adapter it refers to are in the same OTP app. When I do this and repeatedly runmix compile
on a machine with 8 cores, this fails 50% of the time but never fails during the first compilation pass after runningmix clean
.Upon consulting Elixir Documentation on code loading I believe this call should be changed. Once this is changed the wobbliness is no more.
The text was updated successfully, but these errors were encountered: