We currently auto-sort the children of any mirror with a display style of dictionary or set alphabetically. This is important for consistent dumps (good for snapshot tests, too), but affects types that don't need the sorting, like ordered dictionaries and sets.
This PR introduces an _UnorderedCollection protocol to control this behavior, and conforms Dictionary, Set, and their NS- predecessors, but leaves other types open to dumping and diffing in an ordered way by default.
We currently auto-sort the children of any mirror with a display style of dictionary or set alphabetically. This is important for consistent dumps (good for snapshot tests, too), but affects types that don't need the sorting, like ordered dictionaries and sets.
This PR introduces an
_UnorderedCollection
protocol to control this behavior, and conformsDictionary
,Set
, and theirNS
- predecessors, but leaves other types open to dumping and diffing in an ordered way by default.