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

bump: rattler 0.6.0 #185

Merged
merged 2 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
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
48 changes: 24 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rattler_conda_types = { default-features = false, git = "https://github.com/mamb
rattler_networking = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main" }
rattler_repodata_gateway = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main", features = ["sparse"] }
rattler_shell = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main", features = ["sysinfo"] }
rattler_solve = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main", features = ["libsolv-sys"] }
rattler_solve = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main", features = ["libsolv_c"] }
rattler_virtual_packages = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main" }
#rattler = { default-features = false, path="../rattler/crates/rattler" }
#rattler_conda_types = { default-features = false, path="../rattler/crates/rattler_conda_types" }
Expand Down
5 changes: 3 additions & 2 deletions src/cli/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use rattler_conda_types::{
version_spec::VersionOperator, MatchSpec, NamelessMatchSpec, Platform, Version, VersionSpec,
};
use rattler_repodata_gateway::sparse::SparseRepoData;
use rattler_solve::{libsolv_sys, SolverImpl};
use rattler_solve::{libsolv_c, SolverImpl};
use std::collections::HashMap;
use std::path::PathBuf;

Expand Down Expand Up @@ -203,6 +203,7 @@ pub fn determine_best_version(
let available_packages = SparseRepoData::load_records_recursive(
platform_sparse_repo_data,
package_names.iter().cloned(),
None,
)?;

// Construct a solver task to start solving.
Expand All @@ -225,7 +226,7 @@ pub fn determine_best_version(
pinned_packages: vec![],
};

let records = libsolv_sys::Solver.solve(task)?;
let records = libsolv_c::Solver.solve(task)?;

// Determine the versions of the new packages
Ok(records
Expand Down
5 changes: 3 additions & 2 deletions src/cli/global/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use rattler_shell::{
shell::Shell,
shell::ShellEnum,
};
use rattler_solve::{libsolv_sys, SolverImpl};
use rattler_solve::{libsolv_c, SolverImpl};
use std::{
path::{Path, PathBuf},
str::FromStr,
Expand Down Expand Up @@ -213,6 +213,7 @@ pub async fn execute(args: Args) -> anyhow::Result<()> {
let available_packages = SparseRepoData::load_records_recursive(
platform_sparse_repodata.iter(),
vec![package_name.clone()],
None,
)?;

// Solve for environment
Expand All @@ -232,7 +233,7 @@ pub async fn execute(args: Args) -> anyhow::Result<()> {
};

// Solve it
let records = libsolv_sys::Solver.solve(task)?;
let records = libsolv_c::Solver.solve(task)?;

// Create the binary environment prefix where we install or update the package
let bin_prefix = BinEnvDir::create(&package_name).await?;
Expand Down
5 changes: 3 additions & 2 deletions src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use rattler_conda_types::{
};
use rattler_networking::AuthenticatedClient;
use rattler_repodata_gateway::sparse::SparseRepoData;
use rattler_solve::{libsolv_sys, SolverImpl};
use rattler_solve::{libsolv_c, SolverImpl};
use std::collections::HashMap;
use std::{
collections::{HashSet, VecDeque},
Expand Down Expand Up @@ -321,6 +321,7 @@ pub async fn update_lock_file(
let available_packages = SparseRepoData::load_records_recursive(
platform_sparse_repo_data,
package_names.iter().copied(),
None,
)?;

// Get the virtual packages for this platform
Expand All @@ -341,7 +342,7 @@ pub async fn update_lock_file(
};

// Solve the task
let records = libsolv_sys::Solver.solve(task)?;
let records = libsolv_c::Solver.solve(task)?;

// Update lock file
let mut locked_packages = LockedPackages::new(platform);
Expand Down
2 changes: 1 addition & 1 deletion src/repodata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async fn fetch_repo_data_records_with_progress(
// task.
let repo_data_json_path = result.repo_data_json_path.clone();
match tokio::task::spawn_blocking(move || {
SparseRepoData::new(channel, platform.to_string(), repo_data_json_path)
SparseRepoData::new(channel, platform.to_string(), repo_data_json_path, None)
})
.await
{
Expand Down