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)
Fri, May 3, 8:40 AM
Unknown Object (File)
Fri, May 3, 3:25 AM
Unknown Object (File)
Wed, May 1, 11:37 PM
Unknown Object (File)
Mon, Apr 29, 2:21 PM
Unknown Object (File)
Sun, Apr 28, 11:28 AM
Unknown Object (File)
Thu, Apr 25, 2:46 PM
Unknown Object (File)
Wed, Apr 24, 10:55 PM
Unknown Object (File)
Sun, Apr 21, 7:30 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
Branch
msort1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 22962
Build 31514: Run Core Tests
Build 31513: arc lint + arc unit