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

@ -305,7 +305,7 @@ impl NoBuild {
}
}
#[derive(Debug, Default, Clone, Copy, Hash, Eq, PartialEq, serde::Deserialize)]
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, serde::Deserialize)]
#[serde(deny_unknown_fields, rename_all = "kebab-case")]
#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]