Skip to content

Commit 4488703

Browse files
authored
fix: Allow unknown timestamps in exclude-newer (#5848)
1 parent 50b152b commit 4488703

2 files changed

Lines changed: 6 additions & 13 deletions

File tree

crates/pixi/tests/integration_rust/build_tests.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -732,18 +732,9 @@ bar = "{override_cutoff}"
732732
);
733733
pixi.update_manifest(&manifest_with_both_overrides).unwrap();
734734

735-
let err = pixi
736-
.install()
735+
pixi.install()
737736
.await
738-
.expect_err("timestamp-less source package should remain the only blocker");
739-
let rendered = format_diagnostic(err.as_ref());
740-
assert!(
741-
rendered.contains("my-package 1.0.0 is excluded"),
742-
"{rendered}"
743-
);
744-
assert!(rendered.contains("package has no timestamp"), "{rendered}");
745-
assert!(!rendered.contains("bar 1 is excluded"), "{rendered}");
746-
assert!(!rendered.contains("foo 1 is excluded"), "{rendered}");
737+
.expect("timestamp-less pixi-build source packages should remain eligible");
747738
}
748739

749740
/// Test that demonstrates using PassthroughBackend with PixiControl

crates/pixi_spec/src/exclude_newer.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ pub struct ResolvedExcludeNewer {
3434
pub package_cutoffs: BTreeMap<PackageName, DateTime<Utc>>,
3535

3636
/// Whether to include packages that don't have a timestamp.
37-
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
3837
pub include_unknown_timestamp: bool,
3938
}
4039

@@ -59,7 +58,9 @@ impl ResolvedExcludeNewer {
5958
cutoff,
6059
channel_cutoffs: BTreeMap::new(),
6160
package_cutoffs: BTreeMap::new(),
62-
include_unknown_timestamp: false,
61+
// TODO: After https://github.com/conda/ceps/pull/154 we might need to rethink this
62+
// https://github.com/prefix-dev/pixi/pull/5848/changes#r3051252281
63+
include_unknown_timestamp: true,
6364
}
6465
}
6566

@@ -324,5 +325,6 @@ mod test {
324325
),
325326
package_cutoff
326327
);
328+
assert!(config.include_unknown_timestamp());
327329
}
328330
}

0 commit comments

Comments
 (0)