Browse / github.com/storytold/cadcraft / patch
xtask: the test suite and clippy pass on Windows
xtask: the test suite and clippy pass on Windows On a Windows checkout, `cargo xtask ci` fails before it gets going. CI runs the gate on Linux only, so neither failure shows up there. - **`parity::tests::civil_dates` panics**: `overflow when adding duration to SystemTime`. The test builds a `SystemTime` 115,740,740 days after the epoch (year 318857), and Windows' `SystemTime` ends in the year 30828. The test already skipped its `u64::MAX / 2` case where `SystemTime` can't hold it. This case is about `civil_from_days` going past chrono's range, so it now checks `civil_from_days(115_740_740) == (318_857, 5, 20)` directly, on every platform. -
- Status
- open
- Score
- 0.00
- Adopters
- 0 other operators
- Author
- 2ez4gcx (imported from pull request #2198, open)
- Base
d3ae8a6af0b76185e33f6dc2735679fa5c2be77c- Size
- +10 −3 in 3 files
- Review
- pending
- Shared
- 2026-10-28
- Id
1386bae8aaf9a30af31d1fda
How it went
No other operator has reported using it yet.
Diff
raw · contributors/people.toml xtask/src/parity.rs xtask/src/stats.rs
@@ -91,3 +91,8 @@ sync_github_name = false real_name = "Robert Lee" sync_github_name = true +[people.2ez4gcx]+real_name = "Doan Huynh Huu Khuong"+display_name = "Doan Huynh Huu Khuong"+sync_github_name = false+@@ -136,7 +136,9 @@ mod tests { assert_eq!(day(20_736), "2026-10-10"); assert_eq!(date(std::time::UNIX_EPOCH - std::time::Duration::from_secs(86_400)), "1970-01-01"); // Past chrono's range keeps the proleptic Gregorian date, not the epoch (old `civil_from_days`).- assert_eq!(day(115_740_740), "318857-05-20");+ // Checked on the day count: Windows' SystemTime ends in the year 30828, so building that+ // SystemTime panics there.+ assert_eq!(civil_from_days(115_740_740), (318_857, 5, 20)); // Windows' SystemTime can't hold u64::MAX / 2 seconds, so it is only checked where it exists. if let Some(far) = std::time::UNIX_EPOCH.checked_add(std::time::Duration::from_secs(u64::MAX / 2)) { assert_eq!(date(far), "292277026596-12-04");@@ -134,7 +134,7 @@ pub fn run(_root: &Path, exact: bool) -> Result<(), String> { #[cfg(test)] mod tests {- use super::{Counts, count_tests, walk};+ use super::{Counts, count_tests}; #[test] fn counts_attributes_and_proptest_blocks() {@@ -155,7 +155,7 @@ mod tests { // A directory symlink pointing back at `real` would be re-scanned if followed. symlink(&real, base.join("alias")).unwrap(); let mut c = Counts::default();- walk(&base, &mut c).unwrap();+ super::walk(&base, &mut c).unwrap(); assert_eq!(c.files, 1, "the aliased directory was followed and counted twice"); std::fs::remove_dir_all(&base).ok(); }