@@ -81,13 +81,13 @@ package final class GlobalProductPlan: GlobalTargetInfoProvider
81
81
}
82
82
83
83
/// Maps targets to the set of macro implementations they should load when compiling Swift code.
84
- let swiftMacroImplementationDescriptorsByTarget : [ ConfiguredTarget : Set < SwiftMacroImplementationDescriptor > ]
84
+ package private ( set ) var swiftMacroImplementationDescriptorsByTarget : [ ConfiguredTarget : Set < SwiftMacroImplementationDescriptor > ]
85
85
86
86
/// The set of targets which must build during prepare-for-indexing.
87
- package let targetsRequiredToBuildForIndexing : Set < ConfiguredTarget >
87
+ package private ( set ) var targetsRequiredToBuildForIndexing : Set < ConfiguredTarget >
88
88
89
89
/// The set of targets which need to build a swiftmodule during installAPI
90
- package let targetsWhichShouldBuildModulesDuringInstallAPI : Set < ConfiguredTarget > ?
90
+ package private ( set ) var targetsWhichShouldBuildModulesDuringInstallAPI : Set < ConfiguredTarget > ?
91
91
92
92
/// All targets in the product plan.
93
93
/// - remark: This property is preferred over the `TargetBuildGraph` in the `BuildPlanRequest` as it performs additional computations for Swift packages.
@@ -787,6 +787,17 @@ package final class GlobalProductPlan: GlobalTargetInfoProvider
787
787
let impartedBuildProperties = self . impartedBuildPropertiesByTarget [ matchingTarget]
788
788
self . impartedBuildPropertiesByTarget. removeValue ( forKey: matchingTarget)
789
789
self . impartedBuildPropertiesByTarget [ dynamicConfiguredTarget] = impartedBuildProperties
790
+
791
+ let descriptors = self . swiftMacroImplementationDescriptorsByTarget. removeValue ( forKey: matchingTarget)
792
+ self . swiftMacroImplementationDescriptorsByTarget [ dynamicConfiguredTarget] = descriptors
793
+
794
+ if self . targetsRequiredToBuildForIndexing. remove ( matchingTarget) != nil {
795
+ self . targetsRequiredToBuildForIndexing. insert ( dynamicConfiguredTarget)
796
+ }
797
+
798
+ if self . targetsWhichShouldBuildModulesDuringInstallAPI? . remove ( matchingTarget) != nil {
799
+ self . targetsWhichShouldBuildModulesDuringInstallAPI? . insert ( dynamicConfiguredTarget)
800
+ }
790
801
}
791
802
}
792
803
0 commit comments