 defmodule Mix.Compilers.Elixir do
   @moduledoc false
+
+  @manifest_vsn 1
 
   @doc """
   Compiles stale Elixir files.

  Removes compiled files.
  """
  def clean(manifest) do
    case File.read(manifest) do
      {:ok, contents} ->
        contents
        |> String.split("\n")
        |> Enum.each &(&1 |> String.split("\t") |> hd |> File.rm)
        File.rm(manifest)
      {:error, _} ->
        :ok
    end
  end

  defp compile_manifest(manifest, entries, stale, dest, on_start) do


  defp remove_stale_entries([{beam, module, source, _d, _f, _bin} = entry|t], changed, removed, acc) do
    if source in changed do
      _ = File.rm(beam)
      _ = :code.purge(module)
      _ = :code.delete(module)
      remove_stale_entries(t, changed, [module|removed], acc)
    else
      remove_stale_entries(t, changed, removed, [entry|acc])
