Skip to content

Commit ec2f9c1

Browse files
authored
Erase manifest unless on upcoming Elixir (#425)
1 parent 4960e49 commit ec2f9c1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/mix/tasks/gettext.extract.ex

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,21 @@ defmodule Mix.Tasks.Gettext.Extract do
112112
end
113113

114114
defp force_compile do
115-
Mix.Tasks.Compile.Elixir.clean()
116-
Enum.each(Mix.Tasks.Compile.Elixir.manifests(), &File.rm/1)
115+
# For old Elixir versions, we have to clean the manifest,
116+
# otherwise we are forced to compile all dependencies.
117+
# Elixir v1.19.3 supports the --force-elixir option below.
118+
if not Version.match?(System.version(), ">= 1.19.3") do
119+
Mix.Tasks.Compile.Elixir.clean()
120+
Enum.each(Mix.Tasks.Compile.Elixir.manifests(), &File.rm/1)
121+
end
117122

118123
# If "compile" was never called, the reenabling is a no-op and
119124
# "compile.elixir" is a no-op as well (because it wasn't reenabled after
120125
# running "compile"). If "compile" was already called, then running
121126
# "compile" is a no-op and running "compile.elixir" will work because we
122127
# manually reenabled it.
123128
Mix.Task.reenable("compile.elixir")
124-
Mix.Task.run("compile")
129+
Mix.Task.run("compile", ["--force-elixir"])
125130
Mix.Task.run("compile.elixir", ["--force"])
126131
end
127132

0 commit comments

Comments
 (0)