From 8dec47467ee5b8b37e41ffb482fb2a5cdea19c41 Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Fri, 7 Jul 2023 17:07:10 +0200 Subject: [PATCH 1/2] bump: rattler 0.6.0 --- Cargo.lock | 48 ++++++++++++++++++++++++------------------------ Cargo.toml | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 767e39a86..56f93777c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2404,19 +2404,6 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" -[[package]] -name = "libsolv-sys" -version = "0.1.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09" -dependencies = [ - "anyhow", - "cc", - "cfg-if", - "cmake", - "libc", - "libz-sys", -] - [[package]] name = "libz-sys" version = "1.1.9" @@ -3286,7 +3273,7 @@ dependencies = [ [[package]] name = "rattler" version = "0.5.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09" +source = "git+https://github.com/mamba-org/rattler?branch=main#e0d52607aa14b501b49f2b611b8d3a7e4b1e235e" dependencies = [ "anyhow", "apple-codesign", @@ -3327,7 +3314,7 @@ dependencies = [ [[package]] name = "rattler_conda_types" version = "0.5.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09" +source = "git+https://github.com/mamba-org/rattler?branch=main#e0d52607aa14b501b49f2b611b8d3a7e4b1e235e" dependencies = [ "chrono", "fxhash", @@ -3355,7 +3342,7 @@ dependencies = [ [[package]] name = "rattler_digest" version = "0.5.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09" +source = "git+https://github.com/mamba-org/rattler?branch=main#e0d52607aa14b501b49f2b611b8d3a7e4b1e235e" dependencies = [ "blake2", "digest 0.10.7", @@ -3367,10 +3354,23 @@ dependencies = [ "tokio", ] +[[package]] +name = "rattler_libsolv_c" +version = "0.5.0" +source = "git+https://github.com/mamba-org/rattler?branch=main#e0d52607aa14b501b49f2b611b8d3a7e4b1e235e" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "cmake", + "libc", + "libz-sys", +] + [[package]] name = "rattler_macros" version = "0.5.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09" +source = "git+https://github.com/mamba-org/rattler?branch=main#e0d52607aa14b501b49f2b611b8d3a7e4b1e235e" dependencies = [ "quote", "syn 2.0.22", @@ -3379,7 +3379,7 @@ dependencies = [ [[package]] name = "rattler_networking" version = "0.5.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09" +source = "git+https://github.com/mamba-org/rattler?branch=main#e0d52607aa14b501b49f2b611b8d3a7e4b1e235e" dependencies = [ "anyhow", "dirs 5.0.1", @@ -3396,7 +3396,7 @@ dependencies = [ [[package]] name = "rattler_package_streaming" version = "0.5.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09" +source = "git+https://github.com/mamba-org/rattler?branch=main#e0d52607aa14b501b49f2b611b8d3a7e4b1e235e" dependencies = [ "bzip2", "chrono", @@ -3419,7 +3419,7 @@ dependencies = [ [[package]] name = "rattler_repodata_gateway" version = "0.5.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09" +source = "git+https://github.com/mamba-org/rattler?branch=main#e0d52607aa14b501b49f2b611b8d3a7e4b1e235e" dependencies = [ "anyhow", "async-compression", @@ -3457,7 +3457,7 @@ dependencies = [ [[package]] name = "rattler_shell" version = "0.5.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09" +source = "git+https://github.com/mamba-org/rattler?branch=main#e0d52607aa14b501b49f2b611b8d3a7e4b1e235e" dependencies = [ "enum_dispatch", "indexmap 1.9.3", @@ -3474,14 +3474,14 @@ dependencies = [ [[package]] name = "rattler_solve" version = "0.5.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09" +source = "git+https://github.com/mamba-org/rattler?branch=main#e0d52607aa14b501b49f2b611b8d3a7e4b1e235e" dependencies = [ "anyhow", "hex", "libc", - "libsolv-sys", "rattler_conda_types", "rattler_digest", + "rattler_libsolv_c", "serde", "tempfile", "thiserror", @@ -3492,7 +3492,7 @@ dependencies = [ [[package]] name = "rattler_virtual_packages" version = "0.5.0" -source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09" +source = "git+https://github.com/mamba-org/rattler?branch=main#e0d52607aa14b501b49f2b611b8d3a7e4b1e235e" dependencies = [ "cfg-if", "libloading", diff --git a/Cargo.toml b/Cargo.toml index 71f952c27..f4f0f3a23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } From f2da44ab97a79cb93745b3585cc3cbcc13444b4f Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Fri, 7 Jul 2023 17:13:55 +0200 Subject: [PATCH 2/2] bump: rattler 0.6.0 --- src/cli/add.rs | 5 +++-- src/cli/global/install.rs | 5 +++-- src/environment.rs | 5 +++-- src/repodata.rs | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/cli/add.rs b/src/cli/add.rs index 24e468aa3..ca67292dc 100644 --- a/src/cli/add.rs +++ b/src/cli/add.rs @@ -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; @@ -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. @@ -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 diff --git a/src/cli/global/install.rs b/src/cli/global/install.rs index a73123005..31364a314 100644 --- a/src/cli/global/install.rs +++ b/src/cli/global/install.rs @@ -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, @@ -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 @@ -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?; diff --git a/src/environment.rs b/src/environment.rs index 9819da502..ca39d3495 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -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}, @@ -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 @@ -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); diff --git a/src/repodata.rs b/src/repodata.rs index 516b9b9fe..dccbe3c03 100644 --- a/src/repodata.rs +++ b/src/repodata.rs @@ -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 {