Skip to content

Commit 6cedb0d

Browse files
committed
revert code reloader changed file detection
This reverts commit 0f9628a. It improves the error message.
1 parent 52698bb commit 6cedb0d

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

lib/phoenix/code_reloader/server.ex

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -289,18 +289,10 @@ 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() |> dbg
292293
config = Mix.Project.config()
293294
build_path = Mix.Project.build_path(config)
294295

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))
303-
304296
case Mix.Utils.extract_stale(configs, manifests) do
305297
[] ->
306298
# If the manifests are more recent than the timestamp,
@@ -316,7 +308,8 @@ defmodule Phoenix.CodeReloader.Server do
316308
raise """
317309
could not compile application: #{Mix.Project.config()[:app]}.
318310
319-
You must restart your server after changing the following files:
311+
You must restart your server after changing configuration files or your dependencies.
312+
In particular, the following files changed and must be recomputed on a server restart:
320313
321314
* #{Enum.map_join(files, "\n * ", &Path.relative_to_cwd/1)}
322315

0 commit comments

Comments
 (0)