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
Unknown Object (File)
Wed, Apr 17, 2:15 PM
Unknown Object (File)
Sun, Apr 14, 10:33 AM
Unknown Object (File)
Fri, Apr 12, 6:49 PM
Unknown Object (File)
Sun, Apr 7, 12:53 PM
Unknown Object (File)
Mon, Apr 1, 12:09 PM
Unknown Object (File)
Sat, Mar 23, 12:43 PM
Unknown Object (File)
Sat, Mar 23, 12:43 PM
Unknown Object (File)
Sat, Mar 23, 12:42 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