Skip to content

Commit

Permalink
feat: use gateway and installer from latest rattler (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv authored Jun 1, 2024
1 parent 24e084c commit eb344bd
Show file tree
Hide file tree
Showing 6 changed files with 204 additions and 562 deletions.
36 changes: 21 additions & 15 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ tui = ['ratatui', 'crossterm', 'ansi-to-tui', 'throbber-widgets-tui', 'tui-input
[dependencies]
serde = { version = "1.0.203", features = ["derive"] }
serde_yaml = "0.9.34"
rattler = { version = "0.26.1", default-features = false, features = ["cli-tools"] }
rattler = { version = "0.26.1", default-features = false, features = ["cli-tools", "indicatif"] }
rattler_conda_types = { version = "0.25.0", default-features = false }
rattler_digest = { version = "0.19.4", default-features = false }
rattler_index = { version = "0.19.14", default-features = false }
rattler_networking = { version = "0.20.8", default-features = false }
rattler_repodata_gateway = { version = "0.20.3", default-features = false, features = [
"sparse",
"gateway",
] }
rattler_shell = { version = "0.20.6", default-features = false, features = [
"sysinfo",
Expand Down
4 changes: 2 additions & 2 deletions src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ pub async fn skip_existing(
all_channels
};

let (_, existing) = load_repodatas(
let existing = load_repodatas(
&channels,
first_output.host_platform(),
tool_configuration,
&match_specs,
tool_configuration,
)
.await
.map_err(|e| miette::miette!("Failed to load repodata: {e}."))?;
Expand Down
8 changes: 7 additions & 1 deletion src/console_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,18 @@ impl LoggingOutputHandler {
}
}

fn with_indent_levels(&self, template: &str) -> String {
/// Return a string with the current indentation level (bars added to the front of the string).
pub fn with_indent_levels(&self, template: &str) -> String {
let state = self.state.lock().unwrap();
let indent_str = indent_levels(state.indentation_level);
format!("{} {}", indent_str, template)
}

/// Return the multi-progress instance.
pub fn multi_progress(&self) -> &MultiProgress {
&self.progress_bars
}

/// Returns the style to use for a progressbar that is currently in progress.
pub fn default_bytes_style(&self) -> indicatif::ProgressStyle {
let template_str = self.with_indent_levels(
Expand Down
4 changes: 0 additions & 4 deletions src/render/resolved_dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,6 @@ pub async fn install_environments(
output: &Output,
tool_configuration: &tool_configuration::Configuration,
) -> Result<(), ResolveError> {
let cache_dir = rattler::default_cache_dir().expect("Could not get default cache dir");

let dependencies = output
.finalized_dependencies
.as_ref()
Expand All @@ -537,7 +535,6 @@ pub async fn install_environments(
&build_deps.resolved,
&output.build_configuration.build_platform,
&output.build_configuration.directories.build_prefix,
&cache_dir,
tool_configuration,
)
.await?;
Expand All @@ -548,7 +545,6 @@ pub async fn install_environments(
&host_deps.resolved,
&output.build_configuration.host_platform,
&output.build_configuration.directories.host_prefix,
&cache_dir,
tool_configuration,
)
.await?;
Expand Down
Loading

0 comments on commit eb344bd

Please sign in to comment.