Commit 7495d88
committed
fix: use
While investigating the changes in this PR:
elixir-lang/elixir#14451
I encountered an error about not being able to load a module at
this line, implying this is called at compile time.
@josevalim pointed out that `Code.ensure_loaded!/1` will have no effect
at compile time, and so this was really just relying on compile order
and would be non-deterministic. `Code.ensure_compiled!/1` is a superset
of `Code.ensure_loaded!/1` and will work at compile time to ensure the depended
on module is compiled.
This would appear to solve #1351.Code.ensure_compiled! at compile time1 parent f88c226 commit 7495d88
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
| 368 | + | |
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| |||
0 commit comments