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)
Sat, Jan 4, 7:40 AM
Unknown Object (File)
Fri, Dec 27, 6:26 PM
Unknown Object (File)
Wed, Dec 25, 1:59 PM
Unknown Object (File)
Thu, Dec 19, 1:12 AM
Unknown Object (File)
Wed, Dec 18, 5:13 PM
Unknown Object (File)
Wed, Dec 18, 2:28 AM
Unknown Object (File)
Fri, Dec 13, 12:52 PM
Unknown Object (File)
Fri, Dec 13, 7:47 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
Branch
msort1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 22962
Build 31514: Run Core Tests
Build 31513: arc lint + arc unit