Skip to content

Remove redundant visited state from xref traversal - #15923

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
claytongentry:remove-extra-xref-visited-state
Sep 21, 2026
Merged

josevalim merged 1 commit into
elixir-lang:mainfrom
claytongentry:remove-extra-xref-visited-state

Conversation

@claytongentry

Copy link
Copy Markdown
Contributor

Assisted-by: Codex:GPT-6

source_tree maintains a result map and a separate visited map with identical keys. Both start empty and receive each vertex before descending into its dependencies, so the result map already provides the visited check.

Remove the second map and tuple threading, preserving traversal order, cycle handling, and the distinction between missing vertices and empty adjacency lists. The separate state was necessary when traversal also filtered dependencies; that filtering moved outside the traversal in ef0cd4112.

@josevalim
josevalim merged commit d4ce6d2 into elixir-lang:main Sep 21, 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