     in_upper? = app in upper_breadths
 
     {acc, match} =
-      Enum.map_reduce list, false, fn(other, match) ->
+      Enum.map_reduce(list, false, fn other, match ->
         %Mix.Dep{app: other_app, opts: other_opts} = other
+
         if other_app == app and other.top_level and dep.top_level do
-          Mix.shell.error "warning: the dependency #{inspect dep.app} is " <>
-                          "duplicated at the top level, please remove one " <>
-                          "of them"
+          Mix.shell().error(
+            "warning: the dependency #{inspect(dep.app)} is " <>
+              "duplicated at the top level, please remove one " <> "of them"
+          )
         end
 
         cond do
           app != other_app ->
             {other, match}
+
           in_upper? && other_opts[:override] ->
             {other |> with_matching_only(dep, in_upper?), true}
+
           converge?(other, dep) ->
-            {other |> with_matching_only(dep, in_upper?)
-                   |> with_matching_req(dep) |> merge_manager(dep, in_upper?), true}
+            other =
+              other
+              |> with_matching_only(dep, in_upper?)
+              |> with_matching_req(dep)
+              |> merge_manager(dep, in_upper?)
+
+            {other, true}
+
           true ->
             tag = if in_upper?, do: :overridden, else: :diverged
             {%{other | status: {tag, dep}}, true}
         end
-      end
+      end)
 
     if match, do: acc
   end

          {:ok, true} -> other
          _ -> %{other | status: {:divergedreq, vsn, dep}}
        end
      _ ->
        other
    end

  """
  def converge(acc, lock, opts, callback) do
    {deps, acc, lock} = all(acc, lock, opts, callback)
    if remote = Mix.RemoteConverger.get(), do: remote.post_converge
    {topological_sort(deps), acc, lock}
  end

  defp all(acc, lock, opts, callback) do
    main = Mix.Dep.Loader.children()
    main = Enum.map(main, &%{&1 | top_level: true})
    apps = Enum.map(main, & &1.app)

    lock_given? = !!lock
    env = opts[:env]

    # If no lock was given, let's read one to fill in the deps
    lock = lock || Mix.Dep.Lock.read()

    # Run converger for all dependencies, except remote
    # dependencies. Since the remote converger may be
