Amazing, thank you!
Since 1.15, Elixir prunes unused code paths. Adding the following line to project/1
callback of your mix.exs
would do.
prune_code_paths: Mix.env() == :prod,
This hack also works for some other erlang stuff, like common_test
I needed in Enfiladex
.
TIL about the Elixir code pruning, thank you!
This works, but also means youāre now only pruning paths in production, so all issues related to it only surface in production.
I use 4 environments, the commons and :ci
for GHA/CI, in which I donāt prune codepaths (and mimic :prod
in general.)
What can be the potential issues? Sorry, Iām not very knowledgeable about this, can you please elaborate a bit?
Afaik mostly missing out on the speedups code path pruning are meant to bring. But Iāve seens code path pruning affect how you interact with applications you donāt explicitly depend on (in dev), like: Observer in iex -S mix - #5 by axelson
Iām reading this too because I couldnāt start observerā¦ Speed reasons, understandable.
I ran with the same issue with my Mac. Reinstalling Xcode developer tools solved it for me