Elixir mix file -: applications vs: extra_applications - when to use which?

From Elixir Documentation :

:applications- all applications that your application depends on at runtime. By default, this list is automatically deduced from your dependencies. Any additional Erlang / Elixir dependency should be specified in :extra_applications. Mix and other tools use the application list to launch your dependencies before launching the application itself.

:extra_applications- A list of Erlang / Elixir applications that you want to run before your application. For example, Elixirs :loggeror Erlangs :crypto.

If the list for is :applicationsautomatically displayed, then what are some examples of scenarios when we should add the application in :applicationsinstead :extra_applications? and vice versa?

+4
source share
1 answer

If you use applications, then no conclusions extra_applicationsare considered. If applicationsnot provided, they are set up something like this:

applications_inferred_from_deps ++ extra_applications

You use one or the other, but never both.

+9
source

Source: https://habr.com/ru/post/1679994/


All Articles