Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ordering for flattener #247

Merged
merged 1 commit into from
Feb 6, 2025
Merged

fix: ordering for flattener #247

merged 1 commit into from
Feb 6, 2025

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Feb 6, 2025

Closes foundry-rs/foundry#9788

ref foundry-rs/foundry#9788 (comment)

Instead of sorting by path, firstly attempts sorting by filenames

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense lgtm

Comment on lines +858 to +862
// Compare dependency counts
match count_0.cmp(count_1) {
o if !o.is_eq() => return o,
_ => {}
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah this isn't quite the same as

if count_0 != count_1 {
  return 
}

because this handles all other variants

@mattsse mattsse merged commit 912fa49 into main Feb 6, 2025
15 checks passed
@mattsse mattsse deleted the klkvr/flatten-compare branch February 6, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

forge flatten sort contracts alphabetically
2 participants