Skip to content

Commit be75e3b

Browse files
author
José Valim
committed
Purge in memory in modules before consolidating, closes #2700
1 parent 9793caa commit be75e3b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/mix/lib/mix/tasks/compile.protocols.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ defmodule Mix.Tasks.Compile.Protocols do
6262
defp maybe_reload(module) do
6363
case :code.which(module) do
6464
atom when is_atom(atom) ->
65-
module
66-
file ->
67-
unless Path.extname(file) == ".beam" do
68-
:code.purge(module)
69-
:code.delete(module)
70-
end
65+
# Module is likely in memory, we purge as an attempt to reload it
66+
:code.purge(module)
67+
:code.delete(module)
68+
:ok
69+
_file ->
70+
:ok
7171
end
7272
end
7373
end

0 commit comments

Comments
 (0)