Reputation: 1672
I have a dependency that starts an application, but I only want to use its modules and don't want its supervisor running. How do I exclude it from startup?
I have not found anything related to this in mans for app.start, run or in Mix.Project
module
Upvotes: 3
Views: 2075
Reputation: 75740
Specifying runtime
is usually the right approach for most elixir applications:
{:some_dep, "~> 1.0.0", runtime: false}
This causes the application supervision tree of the dependency to not get started with the rest of your application. But this still allows you to manually start it during runtime if you desire.
When using app: false
instead, the dependency's Application
module isn't read at all so you can't even manually start it later.
Upvotes: 7
Reputation: 1672
Just found it in mix help deps
Both of them work in my case, not sure what is the difference though.
Upvotes: 4