mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-18 19:21:46 +00:00
Remove uses of Option<MarkerTree> (#5978)
## Summary Follow up to https://github.com/astral-sh/uv/pull/5898. This should fix some of the failures in https://github.com/astral-sh/uv/pull/5887 where `uv lock --locked` is failing due to `Some(true)` and `None` markers not comparing equal.
This commit is contained in:
parent
4eced1bd0c
commit
f5110f7b5e
45 changed files with 228 additions and 330 deletions
|
|
@ -522,8 +522,8 @@ fn update_requirement(old: &mut Requirement, new: &Requirement, has_source: bool
|
|||
}
|
||||
|
||||
// Update the marker expression.
|
||||
if let Some(marker) = new.marker.clone() {
|
||||
old.marker = Some(marker);
|
||||
if new.marker.contents().is_some() {
|
||||
old.marker = new.marker.clone();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use glob::{glob, GlobError, PatternError};
|
|||
use rustc_hash::FxHashSet;
|
||||
use tracing::{debug, trace, warn};
|
||||
|
||||
use pep508_rs::{RequirementOrigin, VerbatimUrl};
|
||||
use pep508_rs::{MarkerTree, RequirementOrigin, VerbatimUrl};
|
||||
use pypi_types::{Requirement, RequirementSource};
|
||||
use uv_fs::{absolutize_path, normalize_path, relative_to, Simplified};
|
||||
use uv_normalize::{GroupName, PackageName, DEV_DEPENDENCIES};
|
||||
|
|
@ -282,7 +282,7 @@ impl Workspace {
|
|||
Some(Requirement {
|
||||
name: project.name.clone(),
|
||||
extras,
|
||||
marker: None,
|
||||
marker: MarkerTree::TRUE,
|
||||
source: RequirementSource::Directory {
|
||||
install_path: member.root.clone(),
|
||||
lock_path: member
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue