Currently, there is no obvious way to use compiled code or external
packages in Mix config files.
There are good reasons to not be able to use application code, because it's
the responsibility of Mix to build that code in the first place.
Still, it's desirable to be able to introduce abstractions in config files,
else there is lots of low-quality ad-hoc code in configs, foreseeably.
It is possible to place e.g. script code in `config/support.exs` and place
`Code.load_file("config/support.exs")` at the top of `config/config.exs`,
but that's only a workaround. And one that makes testing and reused quite
hard.
The question is - would it make sense to introduce *build dependencies* to
Mix?
Build dependencies are a feature many compiled languages use. Java for
certain uses it, npm devDependencies fulfill the same role in Javascript,
if I'm not mistaken.
They might be fetched and compiled in an additional build step.
--
You received this message because you are subscribed to the Google Groups
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elixir-lang-core/76181150-40c4-478e-99ca-3bddd7314519%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.