Gen IR parses through Xcode files that represents the project - pbxproj files - and uses PBXNativeTarget (and others) to represent the main targets. This is also used to do a lot of the dependency tracking as they have a helpful dependency and packageProductDependencies arrays which we can use.
Turns out, as is often the case with this undocumented format, that is not the only way Xcode handles dependencies! There also exists a special build phase (PBXFrameworksBuildPhase - more commonly known to developers as ‘Link Binary with Libraries’) that doesn’t list targets in the dependency arrays. Instead, this phase has a files array - which lists some additional dependencies (some of which are included in either the dependency or package array… but it turns out not all!).
This change adds support for parsing this file list.
In addition, this change also adds a new and improved way of tracking dependencies via a directed graph which improves our ability to control how and when we move files - so as not to miss transitive dependencies.
Gen IR parses through Xcode files that represents the project - pbxproj files - and uses
PBXNativeTarget
(and others) to represent the main targets. This is also used to do a lot of the dependency tracking as they have a helpfuldependency
andpackageProductDependencies
arrays which we can use.Turns out, as is often the case with this undocumented format, that is not the only way Xcode handles dependencies! There also exists a special build phase (
PBXFrameworksBuildPhase
- more commonly known to developers as ‘Link Binary with Libraries’) that doesn’t list targets in the dependency arrays. Instead, this phase has afiles
array - which lists some additional dependencies (some of which are included in either the dependency or package array… but it turns out not all!).This change adds support for parsing this file list.
In addition, this change also adds a new and improved way of tracking dependencies via a directed graph which improves our ability to control how and when we move files - so as not to miss transitive dependencies.