You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(tsconfig): detect cycles when walking project references
A pair of project references that point at each other (a → b → a)
previously caused infinite recursion when `references: "auto"`
recursively loaded the graph, blowing the test thread's stack.
Add a `visited` set threaded through `load_references`. Each tsconfig
inserts its own path before walking its references. When a candidate
reference's loaded path is already in the chain, the cycle edge is
cut: the reference is still attached so its own `paths` are honored,
but its nested references are not walked.
Includes a `references-cycle` fixture (a ↔ b) and a `cyclic_references`
test that asserts resolution succeeds from both sides without stack
overflow.
Direct self-reference (A → A) detection via the existing equality
check inside the cache callback is preserved.
0 commit comments