Although this is actually deprecated in 10.10, new APIs are available in 10.9 and it will make addressing deprecation warnings when upgrading to 10.10 easier.
We now have an Objective-C type that can be used in the UI to show various properties of a bundle.
This commit breaks compatibility with the current bundles preferences page.
Some targets were including headers from frameworks not specified in their link dependencies. For a clean build this could cause an issue because the header was not available at the time of building the target.
The updated link dependencies are also based on what a target’s tests require. Ideally tests would have separate link dependencies, but as we don’t want to maintain this manually, this will have to wait until the build system automatically handles link dependencies.
Currently the commit command uses constants from the CommitWindow framework but should actually not be linked with it. However, the optimizer will strip dead code, so it should not result in much if any difference in the resulting binary and does solve a build dependency issue.
When we see a changed item we drop it from the cache and mark the cache as “incomplete”, indicating that the bundle index should be rebuilt, which in turn causes all known items to be fetched, and the cache will thereby reload the updated entries.
However, when replaying fs-events, we are in a “rebuild index” state and would not re-rebuild the index incase items were dropped.
This makes loading time roughly twice as fast, although some of the speed gain is because we no longer need to convert CFPropertyListRef → plist::any_t.
The bundle item is causing ⌘Q to act subtlety different (issue #1031) but as we still see a lot of users on old versions, the item is still valuable to keep around.
This is work in progress, the reason why the situation arise has not yet been found and there are likely other ways in which the index can be wrong/stale (based on user reports like issue #998).
Since we get the failed sources by a const reference it is only live during the scope of the caller, and our use of blocks makes that scope shorter than the called block’s full scope.
We now store the time of last check in user defaults instead of via extended attributes on the source(s) and do a check every third hour, except of errors, where we retry after 30 minutes.
We now also check for bundle updates even if the sources hasn’t been updated. This is incase we previously updated a source but failed to then update bundles, these will now be updated when we retry, rather than next time the source index has updates.
Overall the code should be simpler and thus more robust. The text in the Bundles preferences page has also been improved slightly in that it will now tell the user if there was a problem updating the bundles, although for the specifics, the user will need to grab the log.
We need this when installing standalone bundle items, saving macros, and when creating items in the bundle editor without a bundle selected.
The user experience of this code is however rather poor in that you can’t actually crete new bundles, the dialog text is not specific, and the logic for what bundle to preselect can be improved (prefer previously created bundle falling back on a local bundle, if any).