-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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(core): recursive resolve deps on create command graph #22989
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 1c84ff0. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 10 targets
Sent with 💌 from NxCloud. |
is there a link to your project with above project graph? i want to test it out. |
Yeah, https://github.com/Naymi/nx-exec-recursive-demo more details here #22994 |
This fix seems to run the command on the project's dependencies as well:
I would expect it to work on the specified project only and therefore output just the last line above. Now, I'm completely new to Nx, so could be wrong with the intent behind |
## introductory <img width="620" alt="image" src="https://github.com/nrwl/nx/assets/21343944/1ef5e2a2-0f65-4fde-aa7d-b52152af59a7"> ## Current Behavior ```shell nx exec --projects=my-node-app -- pwd TypeError: graph.dependencies[id] is not iterable at _findCycle (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/tasks-runner/task-graph-utils.js:8:39) at _findCycle (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/tasks-runner/task-graph-utils.js:11:23) at findCycle (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/tasks-runner/task-graph-utils.js:23:23) at createCommandGraph (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/commands-runner/create-command-graph.js:25:52) at getCommandProjects (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/commands-runner/get-command-projects.js:7:72) at runScriptAsNxTarget (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/command-line/exec/exec.js:60:73) at Object.nxExecCommand (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/command-line/exec/exec.js:44:16) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.handler (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/command-line/exec/command-object.js:11:13) ``` ## Expected Behavior ```shell nx exec --projects=my-node-app -- pwd /tmp/nx-nest-workspace/my-node-lib-2 /tmp/nx-nest-workspace/my-node-lib /tmp/nx-nest-workspace/apps/my-node-app ``` Fixes #22994 Added function that resolves dependencies recursively Co-authored-by: afedorov <[email protected]> (cherry picked from commit e15479b)
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. |
introductory
Current Behavior
Expected Behavior
Fixes #22994
Added function that resolves dependencies recursively