Skip to content

Commit 315eeff

Browse files
SteffenDEjosevalim
andcommitted
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 d9ef909 commit 315eeff

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
@@ -219,17 +219,8 @@ defmodule Phoenix.CodeReloader.Server do
219219

220220
defp mix_compile_unless_stale_config(compilers, compile_args, timestamp, path) do
221221
manifests = Mix.Tasks.Compile.Elixir.manifests()
222+
configs = Mix.Project.config_files()
222223
config = Mix.Project.config()
223-
build_path = Mix.Project.build_path(config)
224-
225-
# Stop if lock or config files change.
226-
# We don't check for mix.exs because changes there that require recompilation
227-
# are often related to deps or configs anyway.
228-
# We also explicitly remove checks for entries in _build because reporting
229-
# them is confusing and they are mostly used for internal Mix book-keeping.
230-
configs =
231-
[config[:lockfile] | Mix.Project.config_files()]
232-
|> Enum.reject(&String.starts_with?(&1, build_path))
233224

234225
case Mix.Utils.extract_stale(configs, manifests) do
235226
[] ->
@@ -245,7 +236,8 @@ defmodule Phoenix.CodeReloader.Server do
245236
raise """
246237
could not compile application: #{Mix.Project.config()[:app]}.
247238
248-
You must restart your server after changing the following files:
239+
You must restart your server after changing configuration files or your dependencies.
240+
In particular, the following files changed and must be recomputed on a server restart:
249241
250242
* #{Enum.map_join(files, "\n * ", &Path.relative_to_cwd/1)}
251243

0 commit comments

Comments
 (0)