Skip to content

Remove redundant dependency passes in Mix.Compilers.Elixir - #15918

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
claytongentry:simplify-dependency-propagation
Sep 20, 2026
Merged

josevalim merged 1 commit into
elixir-lang:mainfrom
claytongentry:simplify-dependency-propagation

Conversation

@claytongentry

Copy link
Copy Markdown
Contributor

Assisted-by: Codex:GPT-6

deps_on/1 propagates config and lock changes through the dependency graph to determine which applications’ modules may require recompilation. It currently accumulates unaffected dependencies and retries them if the pass adds any affected apps.

Mix.Dep.cached/0 already returns dependencies before their dependents. Convergence topologically sorts the graph, and both caching and child-project filtering preserve that order. Each dependency’s affected status is therefore final when visited, so retrying previously unaffected dependencies cannot add anything to the result.

Remove the pending list, progress flag, and retry pass while preserving the same affected-app map and existing short circuit for apps already marked.

deps_on collected unaffected dependencies and retried them whenever a pass found another affected app. Mix.Dep.cached/0 already places dependencies before their dependents, so these retries cannot discover additional affected apps.

Assisted-by: Codex:GPT-6
@josevalim
josevalim merged commit c0444bc into elixir-lang:main Sep 20, 2026
15 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants