     :elixir_code_server.cast({:reset_warnings, compiler_pid})
     schedulers = max(:erlang.system_info(:schedulers_online), 2)
 
-    result = spawn_compilers(files, files, path, options, [], [], schedulers, [])
+    result = spawn_compilers(%{
+      entries: files,
+      original: files,
+      output: path,
+      options: options,
+      waiting: [],
+      queued: [],
+      schedulers: schedulers,
+      result: [],
+    })
 
     # In case --warning-as-errors is enabled and there was a warning,
     # compilation status will be set to error.

  end

  # Wait for messages from child processes
  defp wait_for_messages(entries, original, output, options, waiting, queued, schedulers, result) do
    receive do
      {:struct_available, module} ->
        available = for {:struct, pid, _, waiting_module, _defining} <- waiting,
                        module == waiting_module,
                        do: {pid, :found}

        spawn_compilers(available ++ entries, original, output, options,
                        waiting, queued, schedulers, [{:struct, module} | result])

      {:module_available, child, ref, file, module, binary} ->
        if callback = Keyword.get(options, :each_module) do


        cancel_waiting_timer(queued, child)

        spawn_compilers(%{state | entries: available ++ entries, result: [{:module, module} | result]})

      {:waiting, kind, child, ref, on, defining} ->
        defined = fn {k, m} -> on == m and k in [kind, :module] end
