mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What? Adds path- and operation-level context to the filesystem errors raised by the `turbo-persistence` commit/rollback flow and the `turbo-tasks-backend` database invalidation/versioning helpers. ### Why? A user reported a bare `Access is denied. (OS error 5)` on Windows 11 that surfaced out of the cache `commit` flow with no indication of which file or which filesystem operation failed: https://github.com/vercel/next.js/discussions/95130#discussioncomment-17479429 The underlying issue was fixed in #95495 but this adds more information for future issues. Raw `io::Error`s from `?` carry an OS error code but no path, so there was no way to tell whether the failure was on `CURRENT`, a `.del` file, a per-file `fsync`, the directory `fsync`, or a cleanup `remove_file` etc. ### How? - Adopted the `fs_err` crate for all fs operations in the persistence layer - Added additional context to some flows - Unified `CURRENT` file writing and adopted an 'atomic write' pattern. <!-- NEXT_JS_LLM_PR -->
56 lines
1.4 KiB
TOML
56 lines
1.4 KiB
TOML
[package]
|
|
name = "turbo-persistence"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
license = "MIT"
|
|
|
|
[features]
|
|
default = []
|
|
verify_sst_content = []
|
|
strict_checks = []
|
|
stats = ["quick_cache/stats"]
|
|
print_stats = ["stats"]
|
|
verbose_log = []
|
|
|
|
[dependencies]
|
|
anyhow = { workspace = true }
|
|
bitfield = { workspace = true }
|
|
byteorder = { workspace = true }
|
|
crc32fast = { workspace = true }
|
|
dashmap = { workspace = true}
|
|
either = { workspace = true }
|
|
fs-err = { workspace = true }
|
|
jiff = "0.2.10"
|
|
lzzzz = { workspace = true }
|
|
memmap2 = "0.9.5"
|
|
nohash-hasher = { workspace = true }
|
|
parking_lot = { workspace = true }
|
|
# See https://github.com/vercel/next.js/issues/91708 for why we need the legacy_x86_64_support feature
|
|
qfilter = { version = "=0.3.0-alpha.4", features = ["serde", "legacy_x86_64_support"] }
|
|
postcard = { workspace = true, features = ["alloc", "use-std"] }
|
|
zerocopy = { version = "0.8", features = ["derive"] }
|
|
quick_cache = { workspace = true }
|
|
rustc-hash = { workspace = true }
|
|
smallvec = { workspace = true }
|
|
thread_local = { workspace = true }
|
|
tracing = { workspace = true }
|
|
xxhash-rust = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
criterion = { workspace = true }
|
|
rand = { workspace = true }
|
|
rayon = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
turbo-tasks-malloc = { workspace = true, features = ["custom_allocator"] }
|
|
|
|
[[bin]]
|
|
name = "sst_inspect"
|
|
path = "src/bin/sst_inspect.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[[bench]]
|
|
name = "mod"
|
|
harness = false
|