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:
Charlie Marsh 2024-01-23 14:52:20 -05:00 committed by GitHub
parent 6561617c56
commit 556080225d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 56 additions and 13 deletions

View file

@ -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,
}