mirror of
https://github.com/astral-sh/uv
synced 2026-01-20 21:10:10 -05:00
Use hasher to compute resolution hash (#5495)
## Summary Addressing one TODO. This should be more efficient.
This commit is contained in:
@@ -197,7 +197,7 @@ impl PythonEnvironment {
|
||||
} else {
|
||||
// Otherwise, use a global lockfile.
|
||||
LockedFile::acquire(
|
||||
env::temp_dir().join(format!("uv-{}.lock", cache_key::digest(&self.0.root))),
|
||||
env::temp_dir().join(format!("uv-{}.lock", cache_key::cache_digest(&self.0.root))),
|
||||
self.0.root.user_display(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ use serde::{Deserialize, Serialize};
|
||||
use thiserror::Error;
|
||||
use tracing::{trace, warn};
|
||||
|
||||
use cache_key::digest;
|
||||
use cache_key::cache_digest;
|
||||
use install_wheel_rs::Layout;
|
||||
use pep440_rs::Version;
|
||||
use pep508_rs::{MarkerEnvironment, StringVersion};
|
||||
@@ -716,7 +716,7 @@ impl InterpreterInfo {
|
||||
"",
|
||||
// We use the absolute path for the cache entry to avoid cache collisions for relative
|
||||
// paths. But we don't to query the executable with symbolic links resolved.
|
||||
format!("{}.msgpack", digest(&absolute)),
|
||||
format!("{}.msgpack", cache_digest(&absolute)),
|
||||
);
|
||||
|
||||
// We check the timestamp of the canonicalized executable to check if an underlying
|
||||
|
||||
Reference in New Issue
Block a user