mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-24 13:20:53 +00:00
uv-resolver: error during installation for conflicting extras
This collects ALL activated extras while traversing the lock file to produce a `Resolution` for installation. If any two extras are activated that are conflicting, then an error is produced. We add a couple of tests to demonstrate the behavior. One case is desirable (where we conditionally depend on `package[extra]`) and the other case is undesirable (where we create an uninstallable lock file). Fixes #9942, Fixes #10590
This commit is contained in:
parent
1676e63603
commit
a8d23da59c
3 changed files with 256 additions and 0 deletions
|
|
@ -4897,6 +4897,16 @@ enum LockErrorKind {
|
|||
#[source]
|
||||
err: uv_distribution::Error,
|
||||
},
|
||||
#[error(
|
||||
"Found conflicting extras `{package1}[{extra1}]` \
|
||||
and `{package2}[{extra2}]` enabled simultaneously"
|
||||
)]
|
||||
ConflictingExtra {
|
||||
package1: PackageName,
|
||||
extra1: ExtraName,
|
||||
package2: PackageName,
|
||||
extra2: ExtraName,
|
||||
},
|
||||
}
|
||||
|
||||
/// An error that occurs when a source string could not be parsed.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue