mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Include versions in the lockfile coherence error message (#12249)
This commit is contained in:
parent
0c352c68e9
commit
dfa5eed5ef
2 changed files with 9 additions and 3 deletions
|
@ -2877,6 +2877,8 @@ impl PackageWire {
|
|||
if version != &wheel.filename.version {
|
||||
return Err(LockError::from(LockErrorKind::InconsistentVersions {
|
||||
name: self.id.name,
|
||||
version: version.clone(),
|
||||
wheel: wheel.clone(),
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
@ -5171,10 +5173,14 @@ enum LockErrorKind {
|
|||
},
|
||||
/// A package has inconsistent versions in a single entry
|
||||
// Using name instead of id since the version in the id is part of the conflict.
|
||||
#[error("Locked package and file versions are inconsistent for `{name}`", name = name.cyan())]
|
||||
#[error("The entry for package `{name}` v{version} has wheel `{wheel_filename}` with inconsistent version: v{wheel_version} ", name = name.cyan(), wheel_filename = wheel.filename, wheel_version = wheel.filename.version)]
|
||||
InconsistentVersions {
|
||||
/// The name of the package with the inconsistent entry.
|
||||
name: PackageName,
|
||||
/// The version of the package with the inconsistent entry.
|
||||
version: Version,
|
||||
/// The wheel with the inconsistent version.
|
||||
wheel: Wheel,
|
||||
},
|
||||
#[error(
|
||||
"Found conflicting extras `{package1}[{extra1}]` \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue