Store resolution options in lockfile (#5264)

## Summary

This PR modifies the lockfile to include the impactful resolution
settings, like the resolution and pre-release mode. If any of those
values change, we want to ignore the existing lockfile. Otherwise,
`--resolution lowest-direct` will typically have no effect, which is
really unintuitive.

Closes https://github.com/astral-sh/uv/issues/5226.
This commit is contained in:
Charlie Marsh 2024-07-22 08:28:22 -04:00 committed by GitHub
parent 178300d16b
commit 5a23f05799
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 406 additions and 16 deletions

View file

@ -3,7 +3,7 @@ use std::str::FromStr;
use chrono::{DateTime, Days, NaiveDate, NaiveTime, Utc};
/// A timestamp that excludes files newer than it.
#[derive(Debug, Copy, Clone, serde::Deserialize, serde::Serialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, serde::Deserialize, serde::Serialize)]
pub struct ExcludeNewer(DateTime<Utc>);
impl ExcludeNewer {