next.js
4738add5 - turbo-tasks-fs: write composed files lazily through ComposedFile

Commit
22 hours ago
turbo-tasks-fs: write composed files lazily through ComposedFile Address review feedback on the CellRope PR: - Replace File::from_cell_rope, which read the whole rope into the File as soon as it was built, with a ComposedFile value wrapping the CellRope. Nothing reads the rope when a ComposedFile is created; readers that need the bytes use the cached ComposedFile::content. - Add FileSystem::write_composed (and FileSystemPath::write_composed). By default it writes ComposedFile::content; DiskFileSystem persists only the rope. Its cached preparation task reads the rope (tracked) to compute the same hash a flat write gets, and the effect captures the bytes untracked, retrying when they no longer match. - File goes back to plain content and metadata, so the stale-composition fallback and its tests are gone. - Drop CellRope unit tests that only restated how ResolvedVc, tracked and untracked reads or encoding work. Co-authored-by: Luke Sandberg <210140+lukesandberg@users.noreply.github.com>
Parents
Loading