Open mpsanchis opened 1 year ago
Is this possibly the same issue why nx daemon is disabled in ci? Jobs exit before the daemon exits?
Would having an option in the arguments to control Daemon usage without meddling with global project/workspace configuration acceptable?
We have this flag. https://nx.dev/nx-api/devkit/documents/createProjectGraphAsync#parameters
It is called resetDaemonClient
.
Though I will admit it is a weird name and it isn't well documented.
I wouldn't mind adding some more documentation, but I am not sure I fully understand why the process I spawn gets stuck if the daemon client is not reset. What I understand from the nx docs is that the daemon is a process running in background, and other processes can communicate with it. I would expect that my process does:
However I see that the flag is called resetDaemonClient and not resetDaemonServer, which makes me think that createProjectGraphAsync
is spawning a client in a separate process, which does not end, and then my main process doesn't end because there is a child of his still alive.
Am I correct? If this is correct, I could add this information somewhere, for sure :) I'm understanding Nx more with time, and it'd be a nice first contribution.
This issue has been automatically marked as stale because it hasn't had any activity for 6 months. Many things may have changed within this time. The issue may have already been fixed or it may not be relevant anymore. If at this point, this is still an issue, please respond with updated information. It will be closed in 21 days if no further activity occurs. Thanks for being a part of the Nx community! 🙏
Current Behavior
The following command doesn't finish in a terminal:
If myscript is (simplest use case I could create):
Expected Behavior
Code finishes execution and terminal can run other commands after.
GitHub Repo
No response
Steps to Reproduce
createProjectGraphAsync
Nx Report
Failure Logs
No response
Package Manager Version
pnpm 8.10.0
Operating System
Additional Information
Came up in a conversation with Caleb on discord