mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Use ctime for interpreter timestamps (#1067)
Per https://apenwarr.ca/log/20181113, `ctime` should be a lot more conservative, and should detect things like the issue we see with the python-build-standalone builds, where the `mtime` is identical across builds. On Windows, I'm just using `last_write_time`. But we should probably add `volume_serial_number` and other attributes via [`winapi_util`](https://docs.rs/winapi-util/latest/winapi_util/index.html).
This commit is contained in:
parent
6561617c56
commit
556080225d
3 changed files with 56 additions and 13 deletions
|
@ -1,9 +1,7 @@
|
|||
use std::time::SystemTime;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct CachedByTimestamp<T> {
|
||||
pub timestamp: SystemTime,
|
||||
pub data: T,
|
||||
pub struct CachedByTimestamp<Timestamp, Data> {
|
||||
pub timestamp: Timestamp,
|
||||
pub data: Data,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue