Skip to content
Open
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
1,156 changes: 487 additions & 669 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dashmap = "6.1.0"
deno_task_shell = "0.32.0"
derive_more = "2.0.1"
dialoguer = "0.12.0"
digest = "0.10"
digest = "0.11"
dirs = "6.0.0"
dunce = "1.0.5"
fancy_display = { path = "crates/fancy_display" }
Expand Down Expand Up @@ -227,18 +227,18 @@ zstd = { version = "0.13.3", default-features = false }

# Rattler crates
file_url = "0.3.0"
rattler = { version = "0.43", default-features = false }
rattler_cache = { version = "0.8", default-features = false }
rattler_conda_types = { version = "0.46", default-features = false, features = [
rattler = { version = "0.44", default-features = false }
rattler_cache = { version = "0.9", default-features = false }
rattler_conda_types = { version = "0.47", default-features = false, features = [
"rayon",
] }
rattler_digest = { version = "1.3", default-features = false }
rattler_index = { version = "0.30", default-features = false, features = [
"s3",
] }
rattler_lock = { version = "0.30", default-features = false }
rattler_lock = { version = "0.31", default-features = false }
rattler_menuinst = { version = "0.2", default-features = false }
rattler_networking = { version = "0.27", default-features = false, features = [
rattler_networking = { version = "0.28", default-features = false, features = [
"dirs",
"google-cloud-auth",
] }
Expand All @@ -251,7 +251,7 @@ rattler_upload = { version = "0.7", default-features = false, features = [
"s3",
"sigstore-sign",
] }
rattler_virtual_packages = { version = "2.4", default-features = false }
rattler_virtual_packages = { version = "3.0", default-features = false }
simple_spawn_blocking = { version = "1.1.0", default-features = false }

# Rattler build crates
Expand Down
9 changes: 3 additions & 6 deletions crates/pixi/tests/integration_rust/source_package_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3097,7 +3097,7 @@ async fn test_package_extras_select_per_environment_in_solve_group() {
package_database.add_package(Package::build("dep-bar", "1.0.0").finish());

let mut my_package = Package::build("my-package", "1.0.0").finish();
my_package.package_record.experimental_extra_depends = std::collections::BTreeMap::from([
my_package.package_record.extra_depends = std::collections::BTreeMap::from([
("foo".to_string(), vec!["dep-foo".to_string()]),
("bar".to_string(), vec!["dep-bar".to_string()]),
]);
Expand Down Expand Up @@ -3196,7 +3196,7 @@ async fn test_package_extras_lock_file_is_satisfiable() {
package_database.add_package(Package::build("dep-bar", "1.0.0").finish());

let mut my_package = Package::build("my-package", "1.0.0").finish();
my_package.package_record.experimental_extra_depends = std::collections::BTreeMap::from([
my_package.package_record.extra_depends = std::collections::BTreeMap::from([
("foo".to_string(), vec!["dep-foo".to_string()]),
("bar".to_string(), vec!["dep-bar".to_string()]),
]);
Expand Down Expand Up @@ -3287,10 +3287,7 @@ bat = { version = "*", when = { package = "python", version = ">=3.10" } }
.find(|r| r.repodata_record.package_record.name.as_normalized() == "my-package")
.expect("my-package should be installed");

let extras = &my_package
.repodata_record
.package_record
.experimental_extra_depends;
let extras = &my_package.repodata_record.package_record.extra_depends;
let test_group = extras
.get("test")
.expect("built package must record the `test` extra group");
Expand Down
1 change: 1 addition & 0 deletions crates/pixi_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ console = { workspace = true }
dunce = { workspace = true }
fancy_display = { workspace = true }
fs-err = { workspace = true }
hex = { workspace = true }
indexmap = { workspace = true }
itertools = { workspace = true }
miette = { workspace = true }
Expand Down
10 changes: 4 additions & 6 deletions crates/pixi_api/src/workspace/list/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,21 @@ impl Package {
};

let md5 = match package {
PackageExt::Conda(pkg) => pkg.record().and_then(|r| r.md5.map(|h| format!("{h:x}"))),
PackageExt::Conda(pkg) => pkg.record().and_then(|r| r.md5.map(hex::encode)),
PackageExt::PyPI(record, _) => record
.as_package_data()
.as_wheel()
.and_then(|w| w.hash.as_ref())
.and_then(|h| h.md5().map(|m| format!("{m:x}"))),
.and_then(|h| h.md5().map(hex::encode)),
};

let sha256 = match package {
PackageExt::Conda(pkg) => pkg
.record()
.and_then(|r| r.sha256.map(|h| format!("{h:x}"))),
PackageExt::Conda(pkg) => pkg.record().and_then(|r| r.sha256.map(hex::encode)),
PackageExt::PyPI(record, _) => record
.as_package_data()
.as_wheel()
.and_then(|w| w.hash.as_ref())
.and_then(|h| h.sha256().map(|s| format!("{s:x}"))),
.and_then(|h| h.sha256().map(hex::encode)),
};

let arch = match package {
Expand Down
3 changes: 2 additions & 1 deletion crates/pixi_build_backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ native-tls = ["rattler_build_core/native-tls"]

[dependencies]
async-trait = { workspace = true }
chrono = { workspace = true }
clap = { workspace = true, features = ["derive", "env"] }
clap-verbosity-flag = { workspace = true }
fs-err = { workspace = true }
hex = { workspace = true }
indexmap = { workspace = true }
itertools = { workspace = true }
jiff = { workspace = true }
miette = { workspace = true }
minijinja = { workspace = true }
ordermap = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/pixi_build_backend/src/encoded_source_spec_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ impl From<SourcePackageSpec> for EncodedSourceSpecUrl {
pixi_build_types::SourcePackageLocationSpec::Url(url_spec) => {
query_pairs.append_pair("url", url_spec.url.as_str());
if let Some(md5) = &url_spec.md5 {
query_pairs.append_pair("md5", &format!("{md5:x}"));
query_pairs.append_pair("md5", &hex::encode(md5));
}
if let Some(sha256) = &url_spec.sha256 {
query_pairs.append_pair("sha256", &format!("{sha256:x}"));
query_pairs.append_pair("sha256", &hex::encode(sha256));
}
if let Some(subdirectory) = &url_spec.subdirectory {
query_pairs.append_pair("subdirectory", subdirectory);
Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_build_backend/src/intermediate_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ where
channels: vec![],
channel_priority: Default::default(),
solve_strategy: Default::default(),
timestamp: chrono::Utc::now(),
timestamp: jiff::Timestamp::now(),
subpackages: BTreeMap::new(),
packaging_settings: PackagingSettings::from_args(
params
Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_build_backend/src/rattler_build_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub async fn get_build_output(
.collect::<Result<Vec<_>, _>>()
.into_diagnostic()?;

let timestamp = chrono::Utc::now();
let timestamp = jiff::Timestamp::now();

let output = Output {
recipe: recipe.clone(),
Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_build_backend/src/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ impl RattlerBuild {
channels: channels.clone(),
channel_priority: Default::default(),
solve_strategy: Default::default(),
timestamp: chrono::Utc::now(),
timestamp: jiff::Timestamp::now(),
subpackages: subpackages.clone(),
packaging_settings: PackagingSettings::from_args(
CondaArchiveType::Conda,
Expand Down
6 changes: 3 additions & 3 deletions crates/pixi_build_backend_passthrough/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl InMemoryBackend for PassthroughBackend {
// Reflect the extra dependency groups into the package's
// `experimental_extra_depends` so consumers inspecting the built
// `.conda` see the expected extra groups.
modified_index_json.experimental_extra_depends = params
modified_index_json.extra_depends = params
.extra_dependencies
.iter()
.map(|(group, deps)| {
Expand Down Expand Up @@ -595,7 +595,7 @@ fn create_output(

// Extra groups come from the project model, and -
// when the backend was handed a pre-built package - from its index.json.
let mut extra_dependencies = convert_extra_depends(&index_json.experimental_extra_depends);
let mut extra_dependencies = convert_extra_depends(&index_json.extra_depends);
for (group, specs) in
extract_extra_dependencies(&project_model.targets, params.host_platform, &variant)
{
Expand Down Expand Up @@ -983,7 +983,7 @@ impl InMemoryBackendInstantiator for PassthroughBackendInstantiator {
build_number: 0,
constrains: vec![],
depends: vec![],
experimental_extra_depends: Default::default(),
extra_depends: Default::default(),
features: None,
license: project_model.license.clone(),
license_family: None,
Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_build_rattler_build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tokio = { workspace = true, features = ["macros"] }

pixi_build_backend = { workspace = true }

chrono = "0.4.41"
jiff = { workspace = true }
pixi_build_types = { workspace = true }
tracing.workspace = true

Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_build_rattler_build/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ impl Protocol for RattlerBuildBackend {
channels: vec![],
channel_priority: Default::default(),
solve_strategy: Default::default(),
timestamp: chrono::Utc::now(),
timestamp: jiff::Timestamp::now(),
subpackages: BTreeMap::new(),
packaging_settings: PackagingSettings::from_args(
params
Expand Down
1 change: 1 addition & 0 deletions crates/pixi_build_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ repository.workspace = true
version = "0.1.0"

[dependencies]
hex = { workspace = true }
ordermap = { workspace = true, features = ["serde"] }
pixi_stable_hash = { workspace = true, features = [
"rattler_conda_types",
Expand Down
8 changes: 4 additions & 4 deletions crates/pixi_build_types/src/project_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,10 @@ impl std::fmt::Debug for UrlSpec {

debug_struct.field("url", &self.url);
if let Some(md5) = &self.md5 {
debug_struct.field("md5", &format!("{md5:x}"));
debug_struct.field("md5", &hex::encode(md5));
}
if let Some(sha256) = &self.sha256 {
debug_struct.field("sha256", &format!("{sha256:x}"));
debug_struct.field("sha256", &hex::encode(sha256));
}
debug_struct.finish()
}
Expand Down Expand Up @@ -592,10 +592,10 @@ impl std::fmt::Debug for BinaryPackageSpec {
debug_struct.field("subdir", subdir);
}
if let Some(md5) = &self.md5 {
debug_struct.field("md5", &format!("{md5:x}"));
debug_struct.field("md5", &hex::encode(md5));
}
if let Some(sha256) = &self.sha256 {
debug_struct.field("sha256", &format!("{sha256:x}"));
debug_struct.field("sha256", &hex::encode(sha256));
}
if let Some(condition) = &self.condition {
debug_struct.field("condition", condition);
Expand Down
1 change: 1 addition & 0 deletions crates/pixi_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fancy_display = { workspace = true }
flate2 = { workspace = true }
fs-err = { workspace = true, features = ["tokio"] }
futures = { workspace = true }
hex = { workspace = true }
human_bytes = { workspace = true }
indexmap = { workspace = true, features = ["serde"] }
indicatif = { workspace = true }
Expand Down
8 changes: 4 additions & 4 deletions crates/pixi_cli/src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ fn print_package_info<W: Write>(
console::style("Timestamp"),
console::style(
timestamp
.datetime()
.format("%Y-%m-%d %H:%M:%S UTC")
.jiff_timestamp()
.strftime("%Y-%m-%d %H:%M:%S UTC")
.to_string()
)
)?;
Expand Down Expand Up @@ -453,13 +453,13 @@ fn print_package_info<W: Write>(
)?;

let md5 = match package.package_record.md5 {
Some(md5) => format!("{md5:x}"),
Some(md5) => hex::encode(md5),
None => "Not available".to_string(),
};
writeln!(out, "{:19} {}", console::style("MD5"), console::style(md5))?;

let sha256 = match package.package_record.sha256 {
Some(sha256) => format!("{sha256:x}"),
Some(sha256) => hex::encode(sha256),
None => "Not available".to_string(),
};
writeln!(
Expand Down
4 changes: 2 additions & 2 deletions crates/pixi_cli/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ impl PypiExtrasResolver {

for (name, specs) in environment.pypi_dependencies(Some(platform)) {
let key = name.as_normalized().as_dist_info_name();
if let Some(entry) = activated.get_mut(key.as_ref()) {
if let Some(entry) = activated.get_mut(key.as_ref() as &str) {
for spec in specs {
for e in spec.extras() {
if !entry.contains(e) {
Expand All @@ -256,7 +256,7 @@ impl PypiExtrasResolver {
continue;
}
let target = req.name.as_dist_info_name();
let Some(entry) = activated.get_mut(target.as_ref()) else {
let Some(entry) = activated.get_mut(target.as_ref() as &str) else {
continue;
};
for e in &req.extras {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn build_explicit_spec<'a>(
))?;

let mut url = cp.url.clone();
url.set_fragment(Some(&format!("{hash:x}")));
url.set_fragment(Some(&hex::encode(hash)));

packages.push(ExplicitEnvironmentEntry {
url: url.to_owned(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ async fn assemble_source_record_inner(
track_features: vec![],
legacy_bz2_md5: None,
legacy_bz2_size: None,
experimental_extra_depends: extra_depends,
extra_depends,
flags: output.metadata.flags.clone(),
};

Expand Down
13 changes: 6 additions & 7 deletions crates/pixi_command_dispatcher/src/keys/solve_conda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,12 @@ fn derive_fetch_specs_from_source_repodata(spec: &SolveCondaSpec) -> Vec<MatchSp
for sm in &spec.source_repodata {
for record in &sm.records {
let sources = record.sources();
for depend in record.package_record().depends.iter().chain(
record
.package_record()
.experimental_extra_depends
.values()
.flatten(),
) {
for depend in record
.package_record()
.depends
.iter()
.chain(record.package_record().extra_depends.values().flatten())
{
let Ok(match_spec) = MatchSpec::from_str(
depend,
ParseMatchSpecOptions::lenient().with_repodata_revision(RepodataRevision::V3),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,13 +550,12 @@ async fn walk_and_resolve(
for record in records.iter() {
let anchor =
SourceAnchor::from(SourceLocationSpec::from(record.manifest_source().clone()));
for depend_str in record.package_record().depends.iter().chain(
record
.package_record()
.experimental_extra_depends
.values()
.flatten(),
) {
for depend_str in record
.package_record()
.depends
.iter()
.chain(record.package_record().extra_depends.values().flatten())
{
let Ok(match_spec) = MatchSpec::from_str(
depend_str,
ParseMatchSpecOptions::lenient().with_repodata_revision(RepodataRevision::V3),
Expand Down
1 change: 1 addition & 0 deletions crates/pixi_compute_sources/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ url = { workspace = true }

[dev-dependencies]
fs-err = { workspace = true }
hex = { workspace = true }
pixi_compute_env_vars = { workspace = true }
pixi_test_utils = { workspace = true }
rattler_digest = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_compute_sources/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub fn file_url_for_test(tempdir: &TempDir, name: &str) -> Url {
/// expects, so a `pin_and_checkout_url` call hits the cache instead of
/// trying to download.
pub fn prepare_cached_checkout(cache_root: &Path, sha: Sha256Hash) -> PathBuf {
let checkout_dir = cache_root.join("checkouts").join(format!("{sha:x}"));
let checkout_dir = cache_root.join("checkouts").join(hex::encode(sha));
fs::create_dir_all(&checkout_dir).unwrap();
fs::write(checkout_dir.join("payload.txt"), "cached contents").unwrap();
fs::write(checkout_dir.join(".pixi-url-ready"), "ready").unwrap();
Expand Down
2 changes: 2 additions & 0 deletions crates/pixi_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ dialoguer = { workspace = true }
dunce = { workspace = true }
fancy_display = { workspace = true }
fs-err = { workspace = true }
hex = { workspace = true }
fs_extra = { workspace = true }
futures = { workspace = true }
human_bytes = { workspace = true }
humantime = { workspace = true }
indexmap = { workspace = true }
indicatif = { workspace = true }
itertools = { workspace = true }
jiff = { workspace = true }
miette = { workspace = true }
once_cell = { workspace = true }
ordermap = { workspace = true }
Expand Down
Loading
Loading