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

Try and stabilize Reflect.scala sortInPlace #4287

Merged
merged 31 commits into from
Jan 15, 2025

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Jan 11, 2025

Tries to fix the instability in https://github.com/com-lihaoyi/mill/actions/runs/12719802399/job/35460719291?pr=4272

It seems sortInPlaceWith uses Ordering.fromLessThan, which means it must return false when both sides are equal. The previous implementation returned true when both getDeclaringClass and getReturnType were equal, which violates that invariant and could possible cause that crash depending on how the sort executes

@lihaoyi lihaoyi marked this pull request as ready for review January 15, 2025 04:12
@lihaoyi lihaoyi marked this pull request as draft January 15, 2025 04:22
@lihaoyi lihaoyi marked this pull request as ready for review January 15, 2025 04:24
@lihaoyi lihaoyi merged commit b1aa385 into com-lihaoyi:main Jan 15, 2025
35 of 37 checks passed
@lefou lefou added this to the 0.12.6 milestone Jan 15, 2025
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.

2 participants