@@ -258,13 +258,6 @@ defmodule Kernel.ParallelCompiler do
258258 { status , modules_or_errors , info } =
259259 try do
260260 spawn_workers ( schedulers , cache , files , output , options )
261- else
262- { :ok , outcome , info } ->
263- beam_timestamp = Keyword . get ( options , :beam_timestamp )
264- { :ok , write_module_binaries ( outcome , output , beam_timestamp ) , info }
265-
266- { :error , errors , info } ->
267- { :error , errors , info }
268261 after
269262 Module.ParallelChecker . stop ( cache )
270263 end
@@ -288,6 +281,7 @@ defmodule Kernel.ParallelCompiler do
288281
289282 { outcome , state } =
290283 spawn_workers ( files , % { } , % { } , [ ] , % { } , [ ] , [ ] , % {
284+ beam_timestamp: Keyword . get ( options , :beam_timestamp ) ,
291285 dest: Keyword . get ( options , :dest ) ,
292286 each_cycle: Keyword . get ( options , :each_cycle , fn -> { :runtime , [ ] , [ ] } end ) ,
293287 each_file: Keyword . get ( options , :each_file , fn _ , _ -> :ok end ) |> each_file ( ) ,
@@ -345,9 +339,10 @@ defmodule Kernel.ParallelCompiler do
345339 ## Verification
346340
347341 defp verify_modules ( result , compile_warnings , dependent_modules , state ) do
342+ modules = write_module_binaries ( result , state . output , state . beam_timestamp )
348343 runtime_warnings = maybe_check_modules ( result , dependent_modules , state )
349344 info = % { compile_warnings: Enum . reverse ( compile_warnings ) , runtime_warnings: runtime_warnings }
350- { { :ok , result , info } , state }
345+ { { :ok , modules , info } , state }
351346 end
352347
353348 defp maybe_check_modules ( result , runtime_modules , state ) do
0 commit comments