Page MenuHomePhabricator

Consider "msort()" on "PhutilSortVector" objects to be an error
ClosedPublic

Authored by epriestley on Jun 17 2019, 5:36 PM.
Tags
None
Referenced Files
F18854728: D20582.id.diff
Sat, Nov 1, 12:30 AM
F18775488: D20582.id49091.diff
Fri, Oct 10, 7:12 PM
F18759220: D20582.id49087.diff
Mon, Oct 6, 2:32 AM
F18735762: D20582.diff
Oct 1 2025, 3:12 AM
F18733978: D20582.diff
Sep 30 2025, 10:45 PM
F18699938: D20582.diff
Sep 27 2025, 1:58 PM
F18659112: D20582.diff
Sep 23 2025, 9:57 AM
F18618466: D20582.diff
Sep 15 2025, 12:12 AM
Subscribers
None

Details

Summary

Ref T13303. If someone upgrades from "msort()" to "msortv()" to get sort stability, but forgets to type a "v", the code executes but likely does not do what this hypothetical person intended.

Consider this an error, since I can come up with no conceivable reason to "msort()" using a method which returns "PhutilSortVector": this means you've done the legwork to stabilize the sort but are choosing unstable behavior, which makes little sense.

Test Plan

See next change.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable