-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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): copy native files to tmp file location instead of .nx/cache #23375
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 6c0038c. 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 6 targets
Sent with 💌 from NxCloud. |
3cc72a9
to
6c0038c
Compare
export const nativeFileCacheLocation = join( | ||
tmpdir(), | ||
'nx-native-file-cache', | ||
createHash('sha256').update(workspaceRoot).digest('hex') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this nesting at all? Can't it be join(tmpdir(), 'nx/bin')
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to keep the same behaviour as before where the files are workspace-scoped. I'm not sure if there could be funky side-effects when one repo calls nx reset and deletes the .node
file that is currently used by another process in another workspace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay sounds good.
export const nativeFileCacheLocation = join( | ||
tmpdir(), | ||
'nx-native-file-cache', | ||
createHash('sha256').update(workspaceRoot).digest('hex') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay sounds good.
#23375) ## Current Behavior Currently, the `.node` files required to load native code are saved in `.nx/cache`. This can cause different issues: - users on windows sometimes experience errors during `nx reset` because it's trying to delete the entire folder and some process is still locking the file - `@angular-eslint` users are seeing the `.nx/cache` folder in their workspace since it uses `@nx/devkit` ## Expected Behavior We want no errors and for noone to be bothered by the `.node` file. This is why we move the `.node` file to a tmp location outside the workspace instead of `.nx/cache`. We still make sure to delete it during `nx reset` but throw no errors if that fails. It will simply be deleted by the next invocation of `nx reset`. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #23224 (cherry picked from commit 5ce5337)
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. |
Current Behavior
Currently, the
.node
files required to load native code are saved in.nx/cache
. This can cause different issues:nx reset
because it's trying to delete the entire folder and some process is still locking the file@angular-eslint
users are seeing the.nx/cache
folder in their workspace since it uses@nx/devkit
Expected Behavior
We want no errors and for noone to be bothered by the
.node
file. This is why we move the.node
file to a tmp location outside the workspace instead of.nx/cache
. We still make sure to delete it duringnx reset
but throw no errors if that fails. It will simply be deleted by the next invocation ofnx reset
.Related Issue(s)
Fixes #23224