fix: properly handle cyclic nodes with getParentClientNodes#14522
fix: properly handle cyclic nodes with getParentClientNodes#14522markdalgleish merged 5 commits intoremix-run:devfrom
Conversation
🦋 Changeset detectedLatest commit: a7f8e4a The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hi @BlankParticle, Welcome, and thank you for contributing to React Router! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
|
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
|
@brophdawg11 hey It has been a long time since I made this PR, I was wondering if anyone can checkout the PR? |
|
Can you open an issue with a minimal reproduction we could use as an example to evaluate the fix? |
|
took some time to figure out how to best reprod it |
|
🤖 Hello there, We just published version Thanks! |
|
🤖 Hello there, We just published version Thanks! |
getParentClientNodesrecursively goes through and figures out the module graph, but there is no protection against import cycles in the traversal, which leads to max Callstack errors everytime a file within the cycle is changedimport cycles are obvisouly not a good thing, I have tried to figure out the cyclic import but has been unable to find it. I have tried https://github.com/sverweij/dependency-cruiser but it was unable to find anything. so I did some debuging and found that the cycle involves
virtual:cloudflare/worker-entry, which makes it way harder to detect as its a virtual module. so I am still unable to figure out the issue.Which is why I just fixed the function to keep track of seen modules, this also removes the need of extra
uniqueModulefunction which make this slightly betterfixes #14670