Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parse lockfile matchspecs lenient #951

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/lock_file/satisfiability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ use itertools::Itertools;
use miette::Diagnostic;
use pep440_rs::VersionSpecifiers;
use pep508_rs::Requirement;
use rattler_conda_types::ParseStrictness::Strict;
use rattler_conda_types::{MatchSpec, ParseMatchSpecError, Platform};
use rattler_conda_types::{MatchSpec, ParseMatchSpecError, ParseStrictness, Platform};
use rattler_lock::{CondaPackage, Package, PypiPackage};
use std::collections::{HashMap, HashSet};
use thiserror::Error;
Expand Down Expand Up @@ -221,7 +220,7 @@ pub fn verify_conda_platform_satisfiability(
.file_name()
.unwrap_or_else(|| record.package_record().name.as_normalized());
for depends in &record.package_record().depends {
let spec = MatchSpec::from_str(depends.as_str(), Strict)
let spec = MatchSpec::from_str(depends.as_str(), ParseStrictness::Lenient)
.map_err(|e| PlatformUnsat::FailedToParseMatchSpec(depends.clone(), e))?;
specs.push((spec, source))
}
Expand Down
Loading