@@ -786,19 +786,16 @@ public final class Settings: PlatformBuildContext, Sendable {
786
786
///
787
787
/// - 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.
788
788
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
+ }
790
795
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 ?
796
797
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 ?
802
799
let targetSettings : MacroValueAssignmentTable ?
803
800
804
801
// 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 {
966
963
return BuildSettingsEditorInfoPayload (
967
964
// Assigned values
968
965
targetSettingAssignments: assignedValues ( for: constructionComponents. targetSettings) ,
969
- targetXcconfigSettingAssignments: assignedValues ( for: constructionComponents. targetXcconfigSettings ) ,
966
+ targetXcconfigSettingAssignments: assignedValues ( for: constructionComponents. targetXcconfig ? . settings ) ,
970
967
projectSettingAssignments: assignedValues ( for: constructionComponents. projectSettings) ,
971
- projectXcconfigSettingAssignments: assignedValues ( for: constructionComponents. projectXcconfigSettings ) ,
968
+ projectXcconfigSettingAssignments: assignedValues ( for: constructionComponents. projectXcconfig ? . settings ) ,
972
969
973
970
// Resolved values
974
971
targetResolvedSettingsValues: resolvedValues ( for: constructionComponents. upToTargetSettings) ,
@@ -1322,18 +1319,16 @@ private class SettingsBuilder {
1322
1319
return core. coreSettings
1323
1320
}
1324
1321
1325
- private var projectXcconfigPath : Path ? = nil
1326
- private var projectXcconfigSettings : MacroValueAssignmentTable ? = nil
1322
+ private var projectXcconfig : Settings . ConstructionComponents . XcconfigInfo ? = nil
1327
1323
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
1330
1325
private var targetSettings : MacroValueAssignmentTable ? = nil
1331
1326
/// Convenient array for iterating over all defined settings tables in the project for this target, from lowest to highest.
1332
1327
private var allProjectSettingsLevels : [ ( table: MacroValueAssignmentTable ? , path: Path ? , level: String ) ] {
1333
1328
return [
1334
- ( projectXcconfigSettings , projectXcconfigPath , " project-xcconfig " ) ,
1329
+ ( projectXcconfig ? . settings , projectXcconfig ? . path , " project-xcconfig " ) ,
1335
1330
( projectSettings, nil , " project " ) ,
1336
- ( targetXcconfigSettings , targetXcconfigPath , " target-xcconfig " ) ,
1331
+ ( targetXcconfig ? . settings , targetXcconfig ? . path , " target-xcconfig " ) ,
1337
1332
( targetSettings, nil , " target " ) ,
1338
1333
]
1339
1334
}
@@ -1347,11 +1342,9 @@ private class SettingsBuilder {
1347
1342
/// The project model components which were used to construct the settings made by this builder.
1348
1343
var constructionComponents : Settings . ConstructionComponents {
1349
1344
return Settings . ConstructionComponents (
1350
- projectXcconfigPath: self . projectXcconfigPath,
1351
- projectXcconfigSettings: self . projectXcconfigSettings,
1345
+ projectXcconfig: self . projectXcconfig,
1352
1346
projectSettings: self . projectSettings,
1353
- targetXcconfigPath: self . targetXcconfigPath,
1354
- targetXcconfigSettings: self . targetXcconfigSettings,
1347
+ targetXcconfig: self . targetXcconfig,
1355
1348
targetSettings: self . targetSettings,
1356
1349
upToDefaultsSettings: self . upToDefaultsSettings,
1357
1350
upToProjectXcconfigSettings: upToProjectXcconfigSettings,
@@ -2807,8 +2800,7 @@ private class SettingsBuilder {
2807
2800
}
2808
2801
2809
2802
// 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)
2812
2804
2813
2805
// Also save the table we've constructed so far.
2814
2806
self . upToProjectXcconfigSettings = MacroValueAssignmentTable ( copying: _table)
@@ -3015,8 +3007,7 @@ private class SettingsBuilder {
3015
3007
}
3016
3008
3017
3009
// 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)
3020
3011
3021
3012
// Save the table we've constructed so far.
3022
3013
self . upToTargetXcconfigSettings = MacroValueAssignmentTable ( copying: _table)
0 commit comments