Skip to content

Commit faf16c1

Browse files
Allow local version mismatches when validating lockfile (#12285)
## Summary Closes #12282. ## Test Plan Given: ```toml [project] name = "foo" version = "0.1.0" description = "Add your description here" readme = "README.md" requires-python = ">=3.13.0" dependencies = ["flash-attn"] [tool.uv] environments = ["sys_platform == 'darwin'", "sys_platform == 'linux'"] constraint-dependencies = ["torch==2.5.1"] [tool.uv.sources] flash_attn = [ { url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.5cxx11abiFalse-cp310-cp310-linux_x86_64.whl", marker = "sys_platform == 'linux' and python_version == '3.10'"}, { url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.5cxx11abiFalse-cp311-cp311-linux_x86_64.whl", marker = "sys_platform == 'linux' and python_version == '3.11'"}, { url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.5cxx11abiFalse-cp312-cp312-linux_x86_64.whl", marker = "sys_platform == 'linux' and python_version == '3.12'"}, { url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.5cxx11abiFalse-cp313-cp313-linux_x86_64.whl", marker = "sys_platform == 'linux' and python_version == '3.13'"} ] ``` Ran `uv lock` on `v0.6.5`. Then verified that `uv lock` fails on `v0.6.6` on the same lockfile, but this commit succeeds.
1 parent b78f929 commit faf16c1

File tree

1 file changed

+3
-1
lines changed
  • crates/uv-resolver/src/lock

1 file changed

+3
-1
lines changed

crates/uv-resolver/src/lock/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2874,7 +2874,9 @@ impl PackageWire {
28742874
// Consistency check
28752875
if let Some(version) = &self.id.version {
28762876
for wheel in &self.wheels {
2877-
if version != &wheel.filename.version {
2877+
if *version != wheel.filename.version
2878+
&& *version != wheel.filename.version.clone().without_local()
2879+
{
28782880
return Err(LockError::from(LockErrorKind::InconsistentVersions {
28792881
name: self.id.name,
28802882
version: version.clone(),

0 commit comments

Comments
 (0)