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

chore: bump rattler #1429

Merged
merged 3 commits into from
May 23, 2024
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
83 changes: 24 additions & 59 deletions Cargo.lock

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

28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,24 @@ pep508_rs = { git = "https://github.com/astral-sh/uv", tag = "0.1.38" }
platform-tags = { git = "https://github.com/astral-sh/uv", tag = "0.1.38" }
pypi-types = { git = "https://github.com/astral-sh/uv", tag = "0.1.38" }
pyproject-toml = "0.10.0"
rattler = { version = "0.24.1", default-features = false, features = [
rattler = { version = "0.25.0", default-features = false, features = [
"cli-tools",
] }
rattler_conda_types = { version = "0.23.1", default-features = false }
rattler_digest = { version = "0.19.3", default-features = false }
rattler_lock = { version = "=0.22.7", default-features = false }
rattler_networking = { version = "0.20.6", default-features = false }
rattler_digest = { version = "0.19.4", default-features = false }
rattler_lock = { version = "0.22.7", default-features = false }
rattler_networking = { version = "0.20.7", default-features = false }
rattler_repodata_gateway = { version = "0.20.1", default-features = false, features = [
"sparse",
"gateway"
] }
rattler_shell = { version = "0.20.2", default-features = false, features = [
rattler_shell = { version = "0.20.4", default-features = false, features = [
"sysinfo",
] }
rattler_solve = { version = "0.21.2", default-features = false, features = [
rattler_solve = { version = "0.22.0", default-features = false, features = [
"resolvo",
] }
rattler_virtual_packages = { version = "0.19.10", default-features = false }
rattler_virtual_packages = { version = "0.19.11", default-features = false }
regex = "1.10.4"
requirements-txt = { git = "https://github.com/astral-sh/uv", tag = "0.1.38" }
reqwest = { version = "0.12.4", default-features = false, features = [
Expand Down Expand Up @@ -177,15 +177,15 @@ pep440_rs = { git = "https://github.com/astral-sh/uv", tag = "0.1.38" }
pep508_rs = { git = "https://github.com/astral-sh/uv", tag = "0.1.38" }
# deno_task_shell = { path = "../deno_task_shell" }

# rattler = { git = "https://github.com/mamba-org/rattler", branch = "main" }
rattler = { git = "https://github.com/mamba-org/rattler", branch = "main" }
rattler_conda_types = { git = "https://github.com/mamba-org/rattler", branch = "main" }
# rattler_digest = { git = "https://github.com/mamba-org/rattler", branch = "main" }
rattler_digest = { git = "https://github.com/mamba-org/rattler", branch = "main" }
rattler_lock = { git = "https://github.com/mamba-org/rattler", branch = "main" }
# rattler_networking = { git = "https://github.com/mamba-org/rattler", branch = "main" }
# rattler_repodata_gateway = { git = "https://github.com/mamba-org/rattler", branch = "main" }
# rattler_shell = { git = "https://github.com/mamba-org/rattler", branch = "main" }
# rattler_solve = { git = "https://github.com/mamba-org/rattler", branch = "main" }
# rattler_virtual_packages = { git = "https://github.com/mamba-org/rattler", branch = "main" }
rattler_networking = { git = "https://github.com/mamba-org/rattler", branch = "main" }
rattler_repodata_gateway = { git = "https://github.com/mamba-org/rattler", branch = "main" }
rattler_shell = { git = "https://github.com/mamba-org/rattler", branch = "main" }
rattler_solve = { git = "https://github.com/mamba-org/rattler", branch = "main" }
rattler_virtual_packages = { git = "https://github.com/mamba-org/rattler", branch = "main" }

# rattler_conda_types = { path = "../rattler-1/crates/rattler_conda_types" }
# rattler_digest = { path = "../rattler-1/crates/rattler_digest" }
Expand Down
11 changes: 2 additions & 9 deletions src/cli/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use rattler_conda_types::{
VersionSpec,
};
use rattler_repodata_gateway::{Gateway, RepoData};
use rattler_solve::{resolvo, ChannelPriority, RepoDataIter, SolverImpl};
use rattler_solve::{resolvo, SolverImpl};
use std::time::Instant;
use std::{
collections::{HashMap, HashSet},
Expand Down Expand Up @@ -444,15 +444,8 @@ pub async fn determine_best_version<'p>(
.iter_specs()
.map(|(name, spec)| MatchSpec::from_nameless(spec.clone(), Some(name.clone())))
.collect(),
available_packages: available_packages
.iter()
.map(RepoDataIter)
.collect::<Vec<_>>(),
virtual_packages: environment.virtual_packages(platform),
locked_packages: vec![],
pinned_packages: vec![],
timeout: None,
channel_priority: ChannelPriority::Strict,
..rattler_solve::SolverTask::from_iter(&available_packages)
};

let records = resolvo::Solver.solve(task).into_diagnostic()?;
Expand Down
24 changes: 12 additions & 12 deletions src/cli/global/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rattler_conda_types::{
Channel, ChannelConfig, MatchSpec, PackageName, Platform, PrefixRecord, RepoDataRecord,
};
use rattler_repodata_gateway::sparse::SparseRepoData;
use rattler_solve::{resolvo, ChannelPriority, SolverImpl, SolverTask};
use rattler_solve::{resolvo, SolverImpl, SolverTask};
use reqwest_middleware::ClientWithMiddleware;

use crate::{
Expand All @@ -31,7 +31,8 @@ impl BinDir {
Ok(Self(bin_dir))
}

/// Get the Binary Executable directory, erroring if it doesn't already exist.
/// Get the Binary Executable directory, erroring if it doesn't already
/// exist.
pub async fn from_existing() -> miette::Result<Self> {
let bin_dir = bin_dir().ok_or(miette::miette!(
"could not find global binary executable directory"
Expand All @@ -50,7 +51,8 @@ impl BinDir {
pub struct BinEnvDir(pub PathBuf);

impl BinEnvDir {
/// Construct the path to the env directory for the binary package `package_name`.
/// Construct the path to the env directory for the binary package
/// `package_name`.
fn package_bin_env_dir(package_name: &PackageName) -> miette::Result<PathBuf> {
Ok(bin_env_dir()
.ok_or(miette::miette!(
Expand All @@ -59,7 +61,8 @@ impl BinEnvDir {
.join(package_name.as_normalized()))
}

/// Get the Binary Environment directory, erroring if it doesn't already exist.
/// Get the Binary Environment directory, erroring if it doesn't already
/// exist.
pub async fn from_existing(package_name: &PackageName) -> miette::Result<Self> {
let bin_env_dir = Self::package_bin_env_dir(package_name)?;
if tokio::fs::try_exists(&bin_env_dir)
Expand Down Expand Up @@ -135,7 +138,8 @@ pub(super) fn channel_name_from_prefix(
///
/// # Returns
///
/// The package records (with dependencies records) for the given package MatchSpec
/// The package records (with dependencies records) for the given package
/// MatchSpec
pub fn load_package_records<'a>(
package_matchspec: MatchSpec,
sparse_repodata: impl IntoIterator<Item = &'a SparseRepoData>,
Expand All @@ -155,12 +159,8 @@ pub fn load_package_records<'a>(
// Construct a solver task that we can start solving.
let task = SolverTask {
specs: vec![package_matchspec],
available_packages: &available_packages,
virtual_packages,
locked_packages: vec![],
pinned_packages: vec![],
timeout: None,
channel_priority: ChannelPriority::Strict,
..SolverTask::from_iter(&available_packages)
};

// Solve it
Expand All @@ -169,8 +169,8 @@ pub fn load_package_records<'a>(
Ok(records)
}

/// Get networking Client and fetch [`SparseRepoData`] for the given channels and
/// current platform using the client
/// Get networking Client and fetch [`SparseRepoData`] for the given channels
/// and current platform using the client
///
/// # Returns
///
Expand Down
6 changes: 5 additions & 1 deletion src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ pub async fn execute_transaction(
top_level_progress: ProgressBar,
) -> miette::Result<()> {
// Create an install driver which helps limit the number of concurrent filesystem operations
let install_driver = InstallDriver::new(100, Some(prefix_records), true);
let install_driver = InstallDriver::builder()
.with_io_concurrency_limit(100)
.execute_link_scripts(true)
.with_prefix_records(prefix_records)
.finish();

// Define default installation options.
let install_options = InstallOptions {
Expand Down
Loading
Loading