next.js
1111178b - turbo-tasks-fs: opt-in atomic file writes

Commit
7 hours ago
turbo-tasks-fs: opt-in atomic file writes Add File::with_atomic_write(), which writes the file to a temporary file in the same directory and renames it over the target, the way executables are already written. A concurrent reader sees the previous or the new content, never an empty or partial file. Use it for client reference manifests, which the dev server reads with evalManifest while Turbopack may be rewriting them. The before-write comparison against the file on disk now compares only permissions, the only part of FileMeta stored on disk. Comparing the whole FileMeta would make every atomic write (and every file with a content type) look changed and always be rewritten.
Author
Parents
Loading