@@ -786,19 +786,16 @@ public final class Settings: PlatformBuildContext, Sendable {
786786 ///
787787 /// - remark: The overhead of this object should be very small, because the majority of the actual data are the linked lists of macro definitions, which are shared with the main table in the `Settings` object.
788788 public struct ConstructionComponents : Sendable {
789- // These properties are the individual tables (and info about them) of specific levels which contributed to the Settings.
789+ struct XcconfigInfo : Sendable {
790+ var path : Path
791+ var settings : MacroValueAssignmentTable
792+ var finalLineNumber : Int
793+ var finalColumnNumber : Int
794+ }
790795
791- /// The path to the project-level xcconfig file.
792- let projectXcconfigPath : Path ?
793- /// The project-level xcconfig settings table.
794- let projectXcconfigSettings : MacroValueAssignmentTable ?
795- /// The project-level settings table.
796+ let projectXcconfig : XcconfigInfo ?
796797 let projectSettings : MacroValueAssignmentTable ?
797- /// The path to the target-level xcconfig file.
798- let targetXcconfigPath : Path ?
799- /// The target-level xcconfig settings table.
800- let targetXcconfigSettings : MacroValueAssignmentTable ?
801- /// The target-level settings table.
798+ let targetXcconfig : XcconfigInfo ?
802799 let targetSettings : MacroValueAssignmentTable ?
803800
804801 // These properties are the actual tables of settings up to a certain point, which are used to compute the resolved values of settings at that level in the build settings editor (e.g., in the Levels view).
@@ -966,9 +963,9 @@ public final class Settings: PlatformBuildContext, Sendable {
966963 return BuildSettingsEditorInfoPayload (
967964 // Assigned values
968965 targetSettingAssignments: assignedValues ( for: constructionComponents. targetSettings) ,
969- targetXcconfigSettingAssignments: assignedValues ( for: constructionComponents. targetXcconfigSettings ) ,
966+ targetXcconfigSettingAssignments: assignedValues ( for: constructionComponents. targetXcconfig ? . settings ) ,
970967 projectSettingAssignments: assignedValues ( for: constructionComponents. projectSettings) ,
971- projectXcconfigSettingAssignments: assignedValues ( for: constructionComponents. projectXcconfigSettings ) ,
968+ projectXcconfigSettingAssignments: assignedValues ( for: constructionComponents. projectXcconfig ? . settings ) ,
972969
973970 // Resolved values
974971 targetResolvedSettingsValues: resolvedValues ( for: constructionComponents. upToTargetSettings) ,
@@ -1322,18 +1319,16 @@ private class SettingsBuilder {
13221319 return core. coreSettings
13231320 }
13241321
1325- private var projectXcconfigPath : Path ? = nil
1326- private var projectXcconfigSettings : MacroValueAssignmentTable ? = nil
1322+ private var projectXcconfig : Settings . ConstructionComponents . XcconfigInfo ? = nil
13271323 private var projectSettings : MacroValueAssignmentTable ? = nil
1328- private var targetXcconfigPath : Path ? = nil
1329- private var targetXcconfigSettings : MacroValueAssignmentTable ? = nil
1324+ private var targetXcconfig : Settings . ConstructionComponents . XcconfigInfo ? = nil
13301325 private var targetSettings : MacroValueAssignmentTable ? = nil
13311326 /// Convenient array for iterating over all defined settings tables in the project for this target, from lowest to highest.
13321327 private var allProjectSettingsLevels : [ ( table: MacroValueAssignmentTable ? , path: Path ? , level: String ) ] {
13331328 return [
1334- ( projectXcconfigSettings , projectXcconfigPath , " project-xcconfig " ) ,
1329+ ( projectXcconfig ? . settings , projectXcconfig ? . path , " project-xcconfig " ) ,
13351330 ( projectSettings, nil , " project " ) ,
1336- ( targetXcconfigSettings , targetXcconfigPath , " target-xcconfig " ) ,
1331+ ( targetXcconfig ? . settings , targetXcconfig ? . path , " target-xcconfig " ) ,
13371332 ( targetSettings, nil , " target " ) ,
13381333 ]
13391334 }
@@ -1347,11 +1342,9 @@ private class SettingsBuilder {
13471342 /// The project model components which were used to construct the settings made by this builder.
13481343 var constructionComponents : Settings . ConstructionComponents {
13491344 return Settings . ConstructionComponents (
1350- projectXcconfigPath: self . projectXcconfigPath,
1351- projectXcconfigSettings: self . projectXcconfigSettings,
1345+ projectXcconfig: self . projectXcconfig,
13521346 projectSettings: self . projectSettings,
1353- targetXcconfigPath: self . targetXcconfigPath,
1354- targetXcconfigSettings: self . targetXcconfigSettings,
1347+ targetXcconfig: self . targetXcconfig,
13551348 targetSettings: self . targetSettings,
13561349 upToDefaultsSettings: self . upToDefaultsSettings,
13571350 upToProjectXcconfigSettings: upToProjectXcconfigSettings,
@@ -2807,8 +2800,7 @@ private class SettingsBuilder {
28072800 }
28082801
28092802 // Save the settings table as part of the construction components.
2810- self . projectXcconfigPath = path
2811- self . projectXcconfigSettings = info. table
2803+ self . projectXcconfig = . init( path: path, settings: info. table, finalLineNumber: info. finalLineNumber, finalColumnNumber: info. finalColumnNumber)
28122804
28132805 // Also save the table we've constructed so far.
28142806 self . upToProjectXcconfigSettings = MacroValueAssignmentTable ( copying: _table)
@@ -3015,8 +3007,7 @@ private class SettingsBuilder {
30153007 }
30163008
30173009 // Save the settings table as part of the construction components.
3018- self . targetXcconfigPath = path
3019- self . targetXcconfigSettings = info. table
3010+ self . targetXcconfig = . init( path: path, settings: info. table, finalLineNumber: info. finalLineNumber, finalColumnNumber: info. finalColumnNumber)
30203011
30213012 // Save the table we've constructed so far.
30223013 self . upToTargetXcconfigSettings = MacroValueAssignmentTable ( copying: _table)
0 commit comments