mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Use atomic writes for the cache consistently (#546)
Ensure we're using atomic writes everywhere in our cache to avoid broken cache records and error with parallel puffin actions (https://github.com/astral-sh/puffin/pull/544#issuecomment-1838841581). All json files that are written to the cache are written atomically and the build wheels are written to temp dir and then moved atomically. I didn't touch venv creation though, i don't think that's worth it since python does not support atomic package installation through its design.
This commit is contained in:
parent
e9c9e9718e
commit
d5abd33813
8 changed files with 69 additions and 36 deletions
|
@ -88,10 +88,6 @@ fn venv_impl(
|
|||
)
|
||||
.into_diagnostic()?;
|
||||
|
||||
// If the path already exists, remove it.
|
||||
fs::remove_file(path).ok();
|
||||
fs::remove_dir_all(path).ok();
|
||||
|
||||
writeln!(
|
||||
printer,
|
||||
"Creating virtual environment at: {}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue