Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions lib/mix/tasks/gettext.extract.ex
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,21 @@ defmodule Mix.Tasks.Gettext.Extract do
end

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

# If "compile" was never called, the reenabling is a no-op and
# "compile.elixir" is a no-op as well (because it wasn't reenabled after
# running "compile"). If "compile" was already called, then running
# "compile" is a no-op and running "compile.elixir" will work because we
# manually reenabled it.
Mix.Task.reenable("compile.elixir")
Mix.Task.run("compile")
Mix.Task.run("compile", ["--force-elixir"])
Mix.Task.run("compile.elixir", ["--force"])
end

Expand Down