Skip to content

Conversation

leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented May 30, 2025

Current Behavior

The @nx/js/typescript plugin writes cache files in a non-atomic fashion, which can result in corrupted or empty files being written.

Expected Behavior

The @nx/js/typescript plugin should write cache files atomically, and they should not be corrupt. It should also retry a limited amount attempts to account for temporary file locks.

Related Issue(s)

Fixes #30239
Fixes #31187

@leosvelperez leosvelperez self-assigned this May 30, 2025
@leosvelperez leosvelperez requested a review from a team as a code owner May 30, 2025 09:28
@leosvelperez leosvelperez requested a review from jaysoo May 30, 2025 09:28
Copy link

vercel bot commented May 30, 2025

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

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview May 30, 2025 9:31am
Copy link
Contributor

nx-cloud bot commented May 30, 2025

View your CI Pipeline Execution ↗ for commit ab6abc4.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 39m 56s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 20s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 4s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 3s View ↗
nx documentation ✅ Succeeded 30s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-30 10:14:32 UTC

@FrozenPandaz FrozenPandaz merged commit 7595d8a into nrwl:master May 30, 2025
7 checks passed
@leosvelperez leosvelperez deleted the js/ts-plugin-atomic-cache-writes branch June 2, 2025 08:13
FrozenPandaz pushed a commit that referenced this pull request Jun 3, 2025
## Current Behavior

The `@nx/js/typescript` plugin writes cache files in a non-atomic
fashion, which can result in corrupted or empty files being written.

## Expected Behavior

The `@nx/js/typescript` plugin should write cache files atomically, and
they should not be corrupt. It should also retry a limited amount
attempts to account for temporary file locks.

## Related Issue(s)

Fixes #30239
Fixes #31187

(cherry picked from commit 7595d8a)
Copy link
Contributor

github-actions bot commented Jun 8, 2025

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 Jun 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants