Skip to content

Commit

Permalink
feat: update rattler
Browse files Browse the repository at this point in the history
  • Loading branch information
nichmor committed Nov 15, 2024
1 parent 75df7e0 commit 305f756
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 34 deletions.
55 changes: 28 additions & 27 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/pixi_config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ impl From<&Config> for rattler_repodata_gateway::ChannelConfig {
jlap_enabled: !config.disable_jlap.unwrap_or(false),
zstd_enabled: !config.disable_zstd.unwrap_or(false),
bz2_enabled: !config.disable_bzip2.unwrap_or(false),
sharded_enabled: false,
cache_action: Default::default(),
})
.unwrap_or_default();
Expand Down
6 changes: 5 additions & 1 deletion crates/pixi_manifest/src/features_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ pub trait FeaturesExt<'source>: HasManifestRef<'source> + HasFeaturesIter<'sourc
self.channels()
.into_iter()
.cloned()
.map(|channel| channel.into_base_url(channel_config))
.map(|channel| {
channel
.into_base_url(channel_config)
.map(|ch| ch.url().clone())
})
.collect()
}

Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_spec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl PixiSpec {
build_number: spec.build_number,
file_name: spec.file_name,
channel: spec.channel.map(|c| {
NamedChannelOrUrl::from_str(&channel_config.canonical_name(c.base_url()))
NamedChannelOrUrl::from_str(&channel_config.canonical_name(c.base_url.url()))
.unwrap()
}),
subdir: spec.subdir,
Expand Down
6 changes: 5 additions & 1 deletion src/cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ pub async fn execute(args: Args) -> miette::Result<()> {
.default_environment()
.channels()
.iter()
.map(|&c| c.clone().into_base_url(&channel_config))
.map(|&c| {
c.clone()
.into_base_url(&channel_config)
.map(|ch| ch.url().clone())
})
.collect::<Result<Vec<_>, _>>()
.into_diagnostic()?,
),
Expand Down
2 changes: 1 addition & 1 deletion src/cli/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl EnvironmentHash {
.channels
.resolve_from_config(config)?
.iter()
.map(|c| c.base_url().to_string())
.map(|c| c.base_url.to_string())
.collect(),
})
}
Expand Down
4 changes: 2 additions & 2 deletions src/lock_file/satisfiability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ pub fn verify_environment_satisfiability(
channel
.clone()
.into_channel(&config)
.map(|channel| channel.base_url().clone())
.map(|channel| channel.base_url.url().clone())
})
.try_collect()?;

Expand All @@ -407,7 +407,7 @@ pub fn verify_environment_satisfiability(
NamedChannelOrUrl::from_str(&c.url)
.unwrap_or_else(|_err| NamedChannelOrUrl::Name(c.url.clone()))
.into_channel(&config)
.map(|channel| channel.base_url().clone())
.map(|channel| channel.base_url.url().clone())
})
.try_collect()?;
if !channels.eq(&locked_channels) {
Expand Down
6 changes: 5 additions & 1 deletion src/lock_file/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,11 @@ async fn spawn_solve_conda_environment_task(
// Collect metadata from all source packages
let channel_urls = channels
.iter()
.map(|c| c.clone().into_base_url(&channel_config))
.map(|c| {
c.clone()
.into_base_url(&channel_config)
.map(|ch| ch.url().clone())
})
.collect::<Result<Vec<_>, _>>()
.into_diagnostic()?;

Expand Down

0 comments on commit 305f756

Please sign in to comment.