Skip to content

Commit ffbae20

Browse files
committed
Improve xref error message, closes #10582
1 parent 9c81578 commit ffbae20

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/mix/lib/mix/compilers/application_tracer.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ defmodule Mix.Compilers.ApplicationTracer do
116116
def format_warning({:undefined_app, app, module, function, arity}) do
117117
"""
118118
#{Exception.format_mfa(module, function, arity)} defined in application :#{app} \
119-
is used by the current application but the current application does not directly \
120-
depend on :#{app}. To fix this, you must do one of:
119+
is used by the current application but the current application does not depend \
120+
on :#{app}. To fix this, you must do one of:
121121
122122
1. If :#{app} is part of Erlang/Elixir, you must include it under \
123123
:extra_applications inside "def application" in your mix.exs
@@ -126,7 +126,7 @@ defmodule Mix.Compilers.ApplicationTracer do
126126
in your mix.exs
127127
128128
3. In case you don't want to add a requirement to :#{app}, you may \
129-
optionally skip this warning by adding [xref: [exclude: #{inspect(module)}]] \
129+
optionally skip this warning by adding [xref: [exclude: [#{inspect(module)}]]] \
130130
to your "def project" in mix.exs
131131
"""
132132
end

lib/mix/test/mix/tasks/compile.elixir_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ defmodule Mix.Tasks.Compile.ElixirTest do
8080
""")
8181

8282
message =
83-
"Logger.info/1 defined in application :logger is used by the current application but the current application does not directly depend on :logger"
83+
"Logger.info/1 defined in application :logger is used by the current application but the current application does not depend on :logger"
8484

8585
assert capture_io(:stderr, fn ->
8686
Mix.Task.run("compile", [])

0 commit comments

Comments
 (0)