         compiled? and fetchable?
       end)
 
-    if true in compiled, do: Mix.Dep.Lock.touch_manifest, else: :ok
+    if true in compiled, do: Mix.Dep.Lock.touch_manifest(), else: :ok
   end
 
   defp maybe_clean(app, opts) do
     if Keyword.get(opts, :force, false) do
-      File.rm_rf! Path.join [Mix.Project.build_path, "lib", Atom.to_string(app)]
+      File.rm_rf!(Path.join([Mix.Project.build_path(), "lib", Atom.to_string(app)]))
     end
   end
 

  end

  defp do_mix(dep, _config) do
    Mix.Dep.in_dependency dep, fn _ ->
      if req = old_elixir_req(Mix.Project.config) do
        Mix.shell.error "warning: the dependency #{inspect dep.app} requires Elixir #{inspect req} " <>
                        "but you are running on v#{System.version}"
      end

      # Force recompilation on compile status
      if dep.status == :compile do
        Mix.Dep.Lock.touch_manifest
      end

      try do
        res = Mix.Task.run("compile", ["--no-deps", "--no-archives-check",
                                       "--no-elixir-version-check", "--no-warnings-as-errors"])
        match?({:ok, _}, res)
      catch
        kind, reason ->
          stacktrace = System.stacktrace
          app = dep.app
          Mix.shell.error "could not compile dependency #{inspect app}, \"mix compile\" failed. " <>
            "You can recompile this dependency with \"mix deps.compile #{app}\", update it " <>
            "with \"mix deps.update #{app}\" or clean it with \"mix deps.clean #{app}\""
          :erlang.raise(kind, reason, stacktrace)
      end
    end
  end

  defp do_rebar(dep, config) do
    lib_path = Path.join(config[:env_path], "lib")
    cmd      = "#{rebar_cmd(dep)} compile skip_deps=true deps_dir=#{inspect lib_path}"
    do_command dep, config, cmd, false
  end

  defp do_rebar3(%Mix.Dep{opts: opts} = dep, config) do
    dep_path    = opts[:build]
    config_path = Path.join(dep_path, "mix.rebar.config")
    lib_path    = Path.join(config[:env_path], "lib/*/ebin")

    env = [{"REBAR_CONFIG", config_path}, {"TERM", "dumb"}]
    cmd = "#{rebar_cmd(dep)} bare compile --paths #{inspect lib_path}"

    File.mkdir_p!(dep_path)
    File.write!(config_path, rebar_config(dep))
    do_command dep, config, cmd, false, env
  end

  defp rebar_config(dep) do
    dep.extra
    |> Mix.Rebar.dependency_config
    |> Mix.Rebar.serialize_config
  end

  defp rebar_cmd(%Mix.Dep{manager: manager} = dep) do

  end

  defp check_unavailable!(app, {:unavailable, _}) do
    Mix.raise(
      "Cannot compile dependency #{inspect(app)} because " <>
        "it isn't available, run \"mix deps.get\" first"
    )
  end

  defp check_unavailable!(_, _) do
