Skip to content

Commit

Permalink
bump: rattler 0.6.0 (#185)
Browse files Browse the repository at this point in the history
* bump: rattler 0.6.0

* bump: rattler 0.6.0
  • Loading branch information
baszalmstra committed Jul 10, 2023
1 parent 24a101d commit eb9077f
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 32 deletions.
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

0 comments on commit eb9077f

Please sign in to comment.