I am using a dependency (in this case floki, but it happens with tesla and jason as well) in one of my projects. But the Elixir compiler keeps giving me this warning:
warning: Floki.text/1 defined in application :floki is used by the current application but the current application does not depend on :floki. To fix this, you must do one of:
1. If :floki is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs
2. If :floki is a dependency, make sure it is listed under "def deps" in your mix.exs
3. In case you don't want to add a requirement to :floki, you may optionally skip this warning by adding [xref: [exclude: [Floki]]] to your "def project" in mix.exs
I don’t really understand the problem, I already defined floki as a dependency:
@cjk if you are using :applications in application/0 then you need to list all dependant applications there. Replace that key with :extra_applications and the message will be gone.