From decf6f942953c6682bfefd261bc074d35b875a6b Mon Sep 17 00:00:00 2001 From: davfsa Date: Sun, 19 May 2024 16:42:50 +0200 Subject: [PATCH] Attempt to fix windows test issues by sorting the projects --- rye/src/pyproject.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rye/src/pyproject.rs b/rye/src/pyproject.rs index 582eef7498..9d6716e50c 100644 --- a/rye/src/pyproject.rs +++ b/rye/src/pyproject.rs @@ -474,6 +474,11 @@ impl Workspace { self: &'a Arc, ) -> impl Iterator> + 'a { walkdir::WalkDir::new(&self.root) + .sort_by( + // Perform proper sorting to avoid platform dependency to ensure + // output reproducibility. This is important for tests + |x,y| x.file_name().cmp(y.file_name()) + ) .into_iter() .filter_entry(|entry| { !(entry.file_type().is_dir() && skip_recurse_into(entry.file_name()))