File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
lib/mix/lib/mix/compilers Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,8 @@ defmodule Mix.Compilers.Protocol do
8686
8787 def compile ( force? , old_protocols_and_impls , protocols_and_impls , opts ) do
8888 output = Mix.Project . consolidation_path ( )
89+ File . mkdir_p! ( output )
90+ Code . prepend_path ( output )
8991
9092 if opts [ :force ] || force? do
9193 clean_consolidated ( )
@@ -113,14 +115,11 @@ defmodule Mix.Compilers.Protocol do
113115 Enum . filter ( paths , & ( not :lists . prefix ( otp , & 1 ) ) )
114116 end
115117
116- defp consolidate ( [ ] , _paths , output , _opts ) do
117- File . mkdir_p! ( output )
118+ defp consolidate ( [ ] , _paths , _output , _opts ) do
118119 :noop
119120 end
120121
121122 defp consolidate ( protocols , paths , output , opts ) do
122- File . mkdir_p! ( output )
123-
124123 protocols
125124 |> Enum . uniq ( )
126125 |> Enum . map ( & Task . async ( fn -> consolidate_each ( & 1 , paths , output , opts ) end ) )
You can’t perform that action at this time.
0 commit comments