Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bundling): handle circular dependencies in @nx/esbuild getExtraDependencies #22644

Conversation

kylecannon
Copy link
Contributor

Current Behavior

In projects that have circular dependencies, @nx/esbuild is unable to be ran because getExtraDependencies does not guard against circular references, causing: RangeError: Maximum call stack size exceeded

Expected Behavior

getExtraDependencies should guard against circular references without crashing.

@kylecannon kylecannon requested a review from a team as a code owner April 3, 2024 02:03
Copy link

vercel bot commented Apr 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Apr 8, 2024 5:20pm

@mandarini mandarini requested review from ndcunningham and removed request for mandarini April 4, 2024 08:36
…pendencies

In more complex projects, there can be circular dependencies that can cause the maximum call stack
exeeced error. To work around this issue, we will track previously visited nodes to avoid runaway
recursion.
@kylecannon kylecannon force-pushed the allow_circular_dependencies_in_get_extra_dependencies branch from 1e0f81f to 298879e Compare April 8, 2024 17:19
@jaysoo jaysoo merged commit e549ea2 into nrwl:master Apr 18, 2024
6 checks passed
FrozenPandaz pushed a commit that referenced this pull request Apr 18, 2024
AgentEnder pushed a commit to AgentEnder/nx that referenced this pull request Apr 23, 2024
@kylecannon kylecannon deleted the allow_circular_dependencies_in_get_extra_dependencies branch April 23, 2024 21:55
Copy link

github-actions bot commented May 1, 2024

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants