Xcode 7.3: plutil should support sorting dictionaries by key

Originator:kusterer
Number:rdar://25932565 Date Originated:26-Apr-2016 06:39 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7.3 (7D175)
Classification:Feature (New) Reproducible:Not Applicable
 
Diffing plists is hard, mainly because the sort order in NSDictionaries is not stable. Thus, a simple one-key insertion can be lost in the noise of dozens of rearranged keys. 

plutil, being the main tool people would use to manipulate this file type, should get an argument switch that makes it output dictionary elements in a stably sorted order. This would make it suitable for making it a default filter preset in FileMerge for plist files, for instance, making it a lot easier to diff two plist files.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!