Skip to content

Commit

Permalink
Attempt to fix windows test issues by sorting the projects
Browse files Browse the repository at this point in the history
  • Loading branch information
davfsa committed May 19, 2024
1 parent d1b8692 commit decf6f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rye/src/pyproject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,11 @@ impl Workspace {
self: &'a Arc<Self>,
) -> impl Iterator<Item = Result<PyProject, Error>> + '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()))
Expand Down

0 comments on commit decf6f9

Please sign in to comment.