Skip to content

Commit d091d26

Browse files
SteffenDEjosevalim
andauthored
revert code reloader changed file detection (#6085)
* revert code reloader changed file detection This reverts commit 0f9628a. It improves the error message. * Update lib/phoenix/code_reloader/server.ex Co-authored-by: José Valim <jose.valim@dashbit.co> --------- Co-authored-by: José Valim <jose.valim@dashbit.co>
1 parent 12811fc commit d091d26

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

lib/phoenix/code_reloader/server.ex

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -289,17 +289,8 @@ defmodule Phoenix.CodeReloader.Server do
289289

290290
defp mix_compile_unless_stale_config(compilers, compile_args, timestamp, path, purge_fallback?) do
291291
manifests = Mix.Tasks.Compile.Elixir.manifests()
292+
configs = Mix.Project.config_files()
292293
config = Mix.Project.config()
293-
build_path = Mix.Project.build_path(config)
294-
295-
# Stop if lock or config files change.
296-
# We don't check for mix.exs because changes there that require recompilation
297-
# are often related to deps or configs anyway.
298-
# We also explicitly remove checks for entries in _build because reporting
299-
# them is confusing and they are mostly used for internal Mix book-keeping.
300-
configs =
301-
[config[:lockfile] | Mix.Project.config_files()]
302-
|> Enum.reject(&String.starts_with?(&1, build_path))
303294

304295
case Mix.Utils.extract_stale(configs, manifests) do
305296
[] ->
@@ -316,7 +307,8 @@ defmodule Phoenix.CodeReloader.Server do
316307
raise """
317308
could not compile application: #{Mix.Project.config()[:app]}.
318309
319-
You must restart your server after changing the following files:
310+
You must restart your server after changing configuration files or your dependencies.
311+
In particular, the following files changed and must be recomputed on a server restart:
320312
321313
* #{Enum.map_join(files, "\n * ", &Path.relative_to_cwd/1)}
322314

0 commit comments

Comments
 (0)