               do: {path, Mix.Utils.last_modified_and_size(path)}
 
         # Plus the sources that have changed in disk
-        changed_paths =
+        changed =
           for source(source: source, external: external, size: size) <- all_sources,
               {last_mtime, last_size} = Map.fetch!(sources_stats, source),
               times = Enum.map(external, &(sources_stats |> Map.fetch!(&1) |> elem(0))),

              into: new_paths,
              do: source

        {changed_paths, sources_stats}
      end

    stale_local_deps = stale_local_deps(manifest, modified)

    {modules, structs, changed} =
      update_stale_entries(all_modules, all_sources, removed ++ changed, stale_local_deps, %{})

    stale = changed -- removed


      |> MapSet.difference(all_paths)
      |> MapSet.to_list()

    {modules, structs, changed, sources_stats} =
      if force do
        # A config, path dependency or manifest has changed, let's just compile everything
        all_paths = MapSet.to_list(all_paths)

        for module(module: module, beam: beam) <- all_modules,
            do: remove_and_purge(beam, module)

        sources_stats =
          for path <- all_paths,
              into: %{},
              do: {path, Mix.Utils.last_modified_and_size(path)}

        # Now that we have deleted all beams, remember to remove the manifest.
        # This is important in case mix compile --force fails, otherwise we
        # would have an outdated manifest.
        File.rm(manifest)

        {[], %{}, all_paths, sources_stats}
      else
        # Otherwise let's start with the new sources
        new_paths =
