Skip to content

Commit 746ac57

Browse files
committed
Do not warn for configured runtime: false deps, closes #10624
1 parent 2118929 commit 746ac57

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/mix/lib/mix/tasks/app.config.ex

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,14 @@ defmodule Mix.Tasks.App.Config do
5757
end
5858

5959
defp check_configured() do
60-
for app <- Mix.ProjectStack.config_apps(), is_nil(Application.spec(app, :vsn)) do
60+
for app <- Mix.ProjectStack.config_apps(),
61+
# Application.spec is a quick check that doesn't involve
62+
# a separate process, so we try that first.
63+
is_nil(Application.spec(app, :vsn)),
64+
# Then we fallback to checking the :code.lib_dir for apps
65+
# with runtime: false, which is still reasonably fast as
66+
# the code server also uses a ETS table
67+
:code.lib_dir(app) == {:error, :bad_name} do
6168
Mix.shell().error("""
6269
You have configured application #{inspect(app)} in your configuration file,
6370
but the application is not available.

0 commit comments

Comments
 (0)