Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix warning because jason app is not declared as dependency #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asmodehn
Copy link

With recent elixir versions (1.11 and 1.12), I get :

==> inch_ex
Compiling 27 files (.ex)
warning: Jason.encode!/2 defined in application :jason is used by the current application but the current application does not depend on :jason. To fix this, you must do one of:

  1. If :jason is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :jason 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 :jason, you may optionally skip this warning by adding [xref: [exclude: [Jason]]] to your "def project" in mix.exs

  lib/inch_ex/json.ex:5: InchEx.JSON.encode!/1

The fix consists in letting mix expand the dependent applications from the list of dependencies instead of overriding them with the :applications key in the project application definition.

Ref : https://hexdocs.pm/mix/Mix.Tasks.Compile.App.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant