Skip to content
Draft
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
81 changes: 29 additions & 52 deletions Cargo.lock

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

26 changes: 26 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,32 @@ version-ranges = { git = "https://github.com/astral-sh/pubgrub", rev = "d8efd776
# `astral-reqwest-middleware` (rattler, rattler-build, uv).
reqwest-middleware = { path = "patches/reqwest_middleware_shim" }

# TODO: remove once rattler_config 0.6 is released (see conda/rattler#2557).
# pixi's `Config` is backed by the redesigned `rattler_config::ConfigBase`,
# which is not on crates.io yet. Every rattler crate that shares public types
# with `rattler_config` (directly or transitively) must come from the same
# source, otherwise cargo would build two copies of e.g.
# `rattler_conda_types` and the shared types would not unify.
file_url = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_cache = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_conda_types = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_config = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_digest = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_index = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_lock = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_menuinst = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_networking = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_package_streaming = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_redaction = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_repodata_gateway = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_s3 = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_shell = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_solve = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_upload = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
rattler_virtual_packages = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }
simple_spawn_blocking = { git = "https://github.com/conda/rattler", branch = "claude/rattler-shared-config-design-m8d2gb" }

# Strip debug info from dependencies: faster links, much smaller `target/`,
# while keeping full debuggability for our own crates.
# See https://matklad.github.io/2021/09/04/fast-rust-builds.html
Expand Down
2 changes: 1 addition & 1 deletion crates/pixi/tests/integration_rust/install_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ async fn install_locked_with_config() {
// Overwrite install location to a target directory
let mut config = Config::default();
let target_dir = pixi.workspace_path().join("target");
config.detached_environments = Some(DetachedEnvironments::Path(target_dir.clone()));
config.extensions.detached_environments = Some(DetachedEnvironments::Path(target_dir.clone()));
fs_err::create_dir_all(target_dir.clone()).unwrap();

let config_path = pixi.workspace().unwrap().pixi_dir().join("config.toml");
Expand Down
4 changes: 2 additions & 2 deletions crates/pixi_api/src/workspace/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ fn build_render_context(dir: &Path, options: &InitOptions, config: &Config) -> R
author: get_default_author(),
platforms: resolve_platforms(options),
channels: resolve_channels_from_options(options, config),
index_url: config.pypi_config.index_url.clone(),
extra_index_urls: config.pypi_config.extra_index_urls.clone(),
index_url: config.pypi_config().index_url.clone(),
extra_index_urls: config.pypi_config().extra_index_urls.clone(),
s3_options: config.s3_options.clone(),
conda_pypi_mapping: options.conda_pypi_mapping.clone(),
}
Expand Down
28 changes: 14 additions & 14 deletions crates/pixi_cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,13 @@ fn alter_config(
let channel = NamedChannelOrUrl::from_str(&input)
.into_diagnostic()
.context("invalid channel name")?;
let mut new_channels = config.default_channels.clone();
let mut new_channels = config.default_channels.clone().unwrap_or_default();
if is_prepend {
new_channels.insert(0, channel);
} else {
new_channels.push(channel);
}
config.default_channels = new_channels;
config.common.default_channels = Some(new_channels);
}
"pypi-config.extra-index-urls" => {
let input = url::Url::parse(&value.expect("value must be provided"))
Expand All @@ -304,7 +304,7 @@ fn alter_config(
} else {
new_urls.push(input);
}
config.pypi_config.extra_index_urls = new_urls;
config.extensions.pypi_config.extra_index_urls = new_urls;
}
_ => {
let list_keys = ["default-channels", "pypi-config.extra-index-urls"];
Expand All @@ -330,19 +330,19 @@ fn partial_config(config: &mut Config, key: &str) -> miette::Result<()> {
let mut new = Config::default();

match key {
"default-channels" => new.default_channels = config.default_channels.clone(),
"shell" => new.shell = config.shell.clone(),
"tls-no-verify" => new.tls_no_verify = config.tls_no_verify,
"default-channels" => new.common.default_channels = config.default_channels.clone(),
"shell" => new.extensions.shell = config.shell().clone(),
"tls-no-verify" => new.common.tls_no_verify = config.tls_no_verify,
"authentication-override-file" => {
new.authentication_override_file = config.authentication_override_file.clone()
new.common.authentication_override_file = config.authentication_override_file.clone()
}
"mirrors" => new.mirrors = config.mirrors.clone(),
"repodata-config" => new.repodata_config = config.repodata_config.clone(),
"pypi-config" => new.pypi_config = config.pypi_config.clone(),
"proxy-config" => new.proxy_config = config.proxy_config.clone(),
"allow-symbolic-links" => new.allow_symbolic_links = config.allow_symbolic_links,
"allow-hard-links" => new.allow_hard_links = config.allow_hard_links,
"allow-ref-links" => new.allow_ref_links = config.allow_ref_links,
"mirrors" => new.common.mirrors = config.mirrors.clone(),
"repodata-config" => new.common.repodata_config = config.repodata_config.clone(),
"pypi-config" => new.extensions.pypi_config = config.pypi_config().clone(),
"proxy-config" => new.common.proxy_config = config.proxy_config.clone(),
"allow-symbolic-links" => new.common.allow_symbolic_links = config.allow_symbolic_links,
"allow-hard-links" => new.common.allow_hard_links = config.allow_hard_links,
"allow-ref-links" => new.common.allow_ref_links = config.allow_ref_links,
_ => {
let keys = [
"default-channels",
Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_cli/src/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ pub async fn execute(args: Args) -> miette::Result<()> {
String::new()
};

let source_shell_completions = workspace.config().shell.source_completion_scripts();
let source_shell_completions = workspace.config().shell().source_completion_scripts();

#[cfg(target_family = "windows")]
let res = match interactive_shell {
Expand Down
Loading
Loading