3 ms·
> Apparently, Disk Utility and command line diskutil use different code paths. StorageKit does not appear as a direct dependency of diskutil. [snip] This dupli
by blinkingled 9y ago
> Apparently, Disk Utility and command line diskutil use different code paths. StorageKit does not appear as a direct dependency of diskutil. [snip] This duplication in what’s more or less the same functionality, while sometimes justified, certainly increases the opportunity for bugs.
To me this is the more problematic part - good design would use same code paths as much as possible for the GUI app and the command line one - the UI code in this case will differ but there should really be no need for diskutil and Disk Utility to use duplicate code for storage functions.
- rtpg 9y agoYeah it seems bonkers to me that an OS would ship with two sets of disk management libraries. At worst, at least try to make one depend on the other.
- pducks32 9y agoI can’t believe I’m actually arguing this but devils advocate I guess: in this instance if they both used the same library then the command line would also have this problem. In this case at least there was a work around in that you could use the cli.
- throwanem 9y agoLately, every new macOS release displays less in the way of good design.
- burntcaramel 9y agoI imagine StorageKit is a relatively new addition, or is tailored for UI applications. So I can see why it is not used by diskutil (which has been there from the early days of OS X), at least not yet.
- blinkingled 9y agoUltimately though it comes down to how much effort Apple is willing to put to get things right - doesn't look like that's much in case of macOS.