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
F15525480: D20582.diff
Mon, Apr 21, 2:42 PM
F15498341: D20582.id49087.diff
Sun, Apr 13, 12:42 PM
F15472412: D20582.id49091.diff
Sat, Apr 5, 1:19 PM
F15461612: D20582.id49091.diff
Tue, Apr 1, 9:33 AM
F15453371: D20582.id.diff
Sat, Mar 29, 11:17 AM
F15450085: D20582.id.diff
Fri, Mar 28, 1:50 PM
F15446968: D20582.diff
Thu, Mar 27, 9:07 PM
F15423667: D20582.id49091.diff
Mar 22 2025, 4:36 PM
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