mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-02 12:59:45 +00:00
Warn when there are missing bounds on transitive deps in lowest (#5953)
Warn when there are missing bounds on transitive dependencies with `--resolution lowest`. Implemented as a lazy resolution graph check. Dev deps are odd because they are missing the edge from the root that extras have (they are currently orphans in the resolution graph), but this is more complex to solve properly because we can put dev dep information in a `Requirement` so i special cased them here. Closes #2797 Should help with #1718 --------- Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
This commit is contained in:
parent
ffd18cc75d
commit
a129cf7d7e
6 changed files with 154 additions and 2 deletions
|
|
@ -466,6 +466,17 @@ impl RequirementSource {
|
|||
pub fn is_editable(&self) -> bool {
|
||||
matches!(self, Self::Directory { editable: true, .. })
|
||||
}
|
||||
|
||||
/// If the source is the registry, return the version specifiers
|
||||
pub fn version_specifiers(&self) -> Option<&VersionSpecifiers> {
|
||||
match self {
|
||||
RequirementSource::Registry { specifier, .. } => Some(specifier),
|
||||
RequirementSource::Url { .. }
|
||||
| RequirementSource::Git { .. }
|
||||
| RequirementSource::Path { .. }
|
||||
| RequirementSource::Directory { .. } => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for RequirementSource {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue