Respect dynamic version updates in uv lock (#8867)

## Summary

Closes https://github.com/astral-sh/uv/issues/8866.
This commit is contained in:
Charlie Marsh 2024-11-06 11:40:23 -05:00 committed by GitHub
parent 814b4d159c
commit 987d778631
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 131 additions and 0 deletions

View file

@ -1224,6 +1224,15 @@ impl Lock {
}
};
// Validate the `version` metadata.
if metadata.version != package.id.version {
return Ok(SatisfiesResult::MismatchedVersion(
package.id.name.clone(),
package.id.version.clone(),
Some(metadata.version.clone()),
));
}
// Validate the `requires-dist` metadata.
{
let expected: BTreeSet<_> = metadata