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(core): remove Windows cmd window popups #14965

Merged
merged 3 commits into from Feb 14, 2023

Conversation

Cammisuli
Copy link
Member

Current Behavior

There are a few places where we launch subprocesses to deal with hashing. When this happened, we did not tell Windows to hide or detach the process. This then causes cmd windows to appear

Expected Behavior

No cmd windows should appear when running with the daemon or other nx commands

Related Issue(s)

Fixes #10822

@vercel
Copy link

vercel bot commented Feb 13, 2023

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

Name Status Preview Comments Updated
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 13, 2023 at 11:35PM (UTC)

@Cammisuli Cammisuli enabled auto-merge (squash) February 13, 2023 16:57
Copy link
Collaborator

@FrozenPandaz FrozenPandaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So here's the rules?:

  • execSync
    • needs windowsHide: true
  • spawn
    • needs detached: true

@Cammisuli
Copy link
Member Author

So here's the rules?:

* execSync
  
  * needs `windowsHide: true`

* spawn
  
  * needs `detached: true`

Yea, essentially. Basically if detached is there, use it with shell: false. Otherwise use windowsHide: true

@mayfieldiv
Copy link
Contributor

@Cammisuli
After a fair bit of debugging why nx graph isn't resolving any explicit dependencies on my Windows machine, I've narrowed it down to the addition of detached: true in this MR, which is causing the stdout/stderr results from spawnProcess to always be empty (at least on my machine), so the git-hasher never returns any files. Removing detached: true seems to resolve the issue.

Please let me know if you'd like me to provide more info or if you're able to reproduce on your side.

@Cammisuli
Copy link
Member Author

@mayfieldiv if you're having issues with the git hasher, try enabling the native hasher by setting $env:NX_NATIVE_HASHER='true' in your environment. In the next version of Nx (15.8.0) the native hasher will be on by default.

@mayfieldiv
Copy link
Contributor

It looks like the native hasher doesn't return any files on Windows either in the latest master build. I think I have a fix for the relevant Rust code and will make a PR and tag you in it.

@thomas-ef
Copy link

Has this been released yet ?

@github-actions
Copy link

github-actions bot commented Mar 5, 2023

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 Mar 5, 2023
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.

Error Popup on every nx command (probably from node_modules\nx\src\daemon\server\start.js)
5 participants