@@ -170,11 +170,6 @@ package final class BuildDescription: Serializable, Sendable, Encodable, Cacheab
170170 /// Maps module names to the GUID of the configured target which will define them.
171171 package let definingTargetsByModuleName : [ String : OrderedSet < ConfiguredTarget > ]
172172
173- /// Info captured about the build to be optionally written to a file.
174- ///
175- /// This info is not serialized to the build description, and is only written out if it is not nil, so toggling the environment variable which emits this info needs to produce a new build description.
176- package let capturedBuildInfo : CapturedBuildInfo ?
177-
178173 /// The list of task construction diagnostics. They are getting serialized.
179174 package let diagnostics : [ ConfiguredTarget ? : [ Diagnostic ] ]
180175
@@ -206,7 +201,7 @@ package final class BuildDescription: Serializable, Sendable, Encodable, Cacheab
206201 package let emitFrontendCommandLines : Bool
207202
208203 /// Load a build description from the given path.
209- fileprivate init ( inDir dir: Path , signature: BuildDescriptionSignature , taskStore: FrozenTaskStore , allOutputPaths: Set < Path > , rootPathsPerTarget: [ ConfiguredTarget : [ Path ] ] , moduleCachePathsPerTarget: [ ConfiguredTarget : [ Path ] ] , artifactInfoPerTarget: [ ConfiguredTarget : ArtifactInfo ] , casValidationInfos: [ CASValidationInfo ] , settingsPerTarget: [ ConfiguredTarget : Settings ] , enableStaleFileRemoval: Bool = true , taskActionMap: [ String : TaskAction . Type ] , targetTaskCounts: [ ConfiguredTarget : Int ] , moduleSessionFilePath: Path ? , diagnostics: [ ConfiguredTarget ? : [ Diagnostic ] ] , fs: any FSProxy , invalidationPaths: [ Path ] , recursiveSearchPathResults: [ RecursiveSearchPathResolver . CachedResult ] , copiedPathMap: [ String : String ] , targetDependencies: [ TargetDependencyRelationship ] , definingTargetsByModuleName: [ String : OrderedSet < ConfiguredTarget > ] , capturedBuildInfo : CapturedBuildInfo ? , bypassActualTasks: Bool , targetsBuildInParallel: Bool , emitFrontendCommandLines: Bool ) throws {
204+ fileprivate init ( inDir dir: Path , signature: BuildDescriptionSignature , taskStore: FrozenTaskStore , allOutputPaths: Set < Path > , rootPathsPerTarget: [ ConfiguredTarget : [ Path ] ] , moduleCachePathsPerTarget: [ ConfiguredTarget : [ Path ] ] , artifactInfoPerTarget: [ ConfiguredTarget : ArtifactInfo ] , casValidationInfos: [ CASValidationInfo ] , settingsPerTarget: [ ConfiguredTarget : Settings ] , enableStaleFileRemoval: Bool = true , taskActionMap: [ String : TaskAction . Type ] , targetTaskCounts: [ ConfiguredTarget : Int ] , moduleSessionFilePath: Path ? , diagnostics: [ ConfiguredTarget ? : [ Diagnostic ] ] , fs: any FSProxy , invalidationPaths: [ Path ] , recursiveSearchPathResults: [ RecursiveSearchPathResolver . CachedResult ] , copiedPathMap: [ String : String ] , targetDependencies: [ TargetDependencyRelationship ] , definingTargetsByModuleName: [ String : OrderedSet < ConfiguredTarget > ] , bypassActualTasks: Bool , targetsBuildInParallel: Bool , emitFrontendCommandLines: Bool ) throws {
210205 self . dir = dir
211206 self . signature = signature
212207 self . taskStore = taskStore
@@ -227,7 +222,6 @@ package final class BuildDescription: Serializable, Sendable, Encodable, Cacheab
227222 self . copiedPathMap = copiedPathMap
228223 self . targetDependencies = targetDependencies
229224 self . definingTargetsByModuleName = definingTargetsByModuleName
230- self . capturedBuildInfo = capturedBuildInfo
231225 self . bypassActualTasks = bypassActualTasks
232226 self . targetsBuildInParallel = targetsBuildInParallel
233227 self . emitFrontendCommandLines = emitFrontendCommandLines
@@ -404,8 +398,6 @@ package final class BuildDescription: Serializable, Sendable, Encodable, Cacheab
404398 self . copiedPathMap = try deserializer. deserialize ( )
405399 self . targetDependencies = try deserializer. deserialize ( )
406400 self . definingTargetsByModuleName = try deserializer. deserialize ( )
407- // We don't serialize the captured build info.
408- self . capturedBuildInfo = nil
409401 self . bypassActualTasks = try deserializer. deserialize ( )
410402 self . targetsBuildInParallel = try deserializer. deserialize ( )
411403 self . emitFrontendCommandLines = try deserializer. deserialize ( )
@@ -563,9 +555,6 @@ package final class BuildDescriptionBuilder {
563555 // The map of settings per configured target.
564556 private let settingsPerTarget : [ ConfiguredTarget : Settings ]
565557
566- /// Info captured about the build to be optionally written to a file.
567- package let capturedBuildInfo : CapturedBuildInfo ?
568-
569558 /// For processing Gate and Constructed Tasks in parallel.
570559 private let processTaskLock = SWBMutex ( ( ) )
571560
@@ -574,7 +563,7 @@ package final class BuildDescriptionBuilder {
574563 /// - Parameters:
575564 /// - path: The path of a directory to store the build description to.
576565 /// - bypassActualTasks: If enabled, replace tasks with fake ones (`/usr/bin/true`).
577- init ( path: Path , signature: BuildDescriptionSignature , buildCommand: BuildCommand , taskAdditionalInputs: [ Ref < any PlannedTask > : NodeList ] , mutatedNodes: Set < Ref < any PlannedNode > > , mutatingTasks: [ Ref < any PlannedTask > : MutatingTaskInfo ] , bypassActualTasks: Bool , targetsBuildInParallel: Bool , emitFrontendCommandLines: Bool , moduleSessionFilePath: Path ? , invalidationPaths: [ Path ] , recursiveSearchPathResults: [ RecursiveSearchPathResolver . CachedResult ] , copiedPathMap: [ String : String ] , outputPathsPerTarget: [ ConfiguredTarget ? : [ Path ] ] , allOutputPaths: Set < Path > , rootPathsPerTarget: [ ConfiguredTarget : [ Path ] ] , moduleCachePathsPerTarget: [ ConfiguredTarget : [ Path ] ] , artifactInfoPerTarget: [ ConfiguredTarget : ArtifactInfo ] , casValidationInfos: [ BuildDescription . CASValidationInfo ] , staleFileRemovalIdentifierPerTarget: [ ConfiguredTarget ? : String ] , settingsPerTarget: [ ConfiguredTarget : Settings ] , targetDependencies: [ TargetDependencyRelationship ] , definingTargetsByModuleName: [ String : OrderedSet < ConfiguredTarget > ] , workspace: Workspace , capturedBuildInfo: CapturedBuildInfo ? ) {
566+ init ( path: Path , signature: BuildDescriptionSignature , buildCommand: BuildCommand , taskAdditionalInputs: [ Ref < any PlannedTask > : NodeList ] , mutatedNodes: Set < Ref < any PlannedNode > > , mutatingTasks: [ Ref < any PlannedTask > : MutatingTaskInfo ] , bypassActualTasks: Bool , targetsBuildInParallel: Bool , emitFrontendCommandLines: Bool , moduleSessionFilePath: Path ? , invalidationPaths: [ Path ] , recursiveSearchPathResults: [ RecursiveSearchPathResolver . CachedResult ] , copiedPathMap: [ String : String ] , outputPathsPerTarget: [ ConfiguredTarget ? : [ Path ] ] , allOutputPaths: Set < Path > , rootPathsPerTarget: [ ConfiguredTarget : [ Path ] ] , moduleCachePathsPerTarget: [ ConfiguredTarget : [ Path ] ] , artifactInfoPerTarget: [ ConfiguredTarget : ArtifactInfo ] , casValidationInfos: [ BuildDescription . CASValidationInfo ] , staleFileRemovalIdentifierPerTarget: [ ConfiguredTarget ? : String ] , settingsPerTarget: [ ConfiguredTarget : Settings ] , targetDependencies: [ TargetDependencyRelationship ] , definingTargetsByModuleName: [ String : OrderedSet < ConfiguredTarget > ] , workspace: Workspace ) {
578567 self . path = path
579568 self . signature = signature
580569 self . taskAdditionalInputs = taskAdditionalInputs
@@ -597,7 +586,6 @@ package final class BuildDescriptionBuilder {
597586 self . settingsPerTarget = settingsPerTarget
598587 self . targetDependencies = targetDependencies
599588 self . definingTargetsByModuleName = definingTargetsByModuleName
600- self . capturedBuildInfo = capturedBuildInfo
601589 self . taskStore = TaskStore ( )
602590 }
603591
@@ -705,7 +693,7 @@ package final class BuildDescriptionBuilder {
705693 // Create the build description.
706694 let buildDescription : BuildDescription
707695 do {
708- buildDescription = try BuildDescription ( inDir: path, signature: signature, taskStore: frozenTaskStore, allOutputPaths: allOutputPaths, rootPathsPerTarget: rootPathsPerTarget, moduleCachePathsPerTarget: moduleCachePathsPerTarget, artifactInfoPerTarget: artifactInfoPerTarget, casValidationInfos: casValidationInfos, settingsPerTarget: settingsPerTarget, taskActionMap: taskActionMap, targetTaskCounts: targetTaskCounts, moduleSessionFilePath: moduleSessionFilePath, diagnostics: diagnosticsEngines. mapValues { engine in engine. diagnostics } , fs: fs, invalidationPaths: invalidationPaths, recursiveSearchPathResults: recursiveSearchPathResults, copiedPathMap: copiedPathMap, targetDependencies: targetDependencies, definingTargetsByModuleName: definingTargetsByModuleName, capturedBuildInfo : capturedBuildInfo , bypassActualTasks: bypassActualTasks, targetsBuildInParallel: targetsBuildInParallel, emitFrontendCommandLines: emitFrontendCommandLines)
696+ buildDescription = try BuildDescription ( inDir: path, signature: signature, taskStore: frozenTaskStore, allOutputPaths: allOutputPaths, rootPathsPerTarget: rootPathsPerTarget, moduleCachePathsPerTarget: moduleCachePathsPerTarget, artifactInfoPerTarget: artifactInfoPerTarget, casValidationInfos: casValidationInfos, settingsPerTarget: settingsPerTarget, taskActionMap: taskActionMap, targetTaskCounts: targetTaskCounts, moduleSessionFilePath: moduleSessionFilePath, diagnostics: diagnosticsEngines. mapValues { engine in engine. diagnostics } , fs: fs, invalidationPaths: invalidationPaths, recursiveSearchPathResults: recursiveSearchPathResults, copiedPathMap: copiedPathMap, targetDependencies: targetDependencies, definingTargetsByModuleName: definingTargetsByModuleName, bypassActualTasks: bypassActualTasks, targetsBuildInParallel: targetsBuildInParallel, emitFrontendCommandLines: emitFrontendCommandLines)
709697 }
710698 catch {
711699 throw StubError . error ( " unable to create build description: \( error) " )
@@ -1039,7 +1027,7 @@ extension BuildDescription {
10391027 // FIXME: Bypass actual tasks should go away, eventually.
10401028 //
10411029 // FIXME: This layering isn't working well, we are plumbing a bunch of stuff through here just because we don't want to talk to TaskConstruction.
1042- static package func construct( workspace: Workspace , tasks: [ any PlannedTask ] , path: Path , signature: BuildDescriptionSignature , buildCommand: BuildCommand , diagnostics: [ ConfiguredTarget ? : [ Diagnostic ] ] = [ : ] , indexingInfo: [ ( forTarget: ConfiguredTarget ? , path: Path , indexingInfo: any SourceFileIndexingInfo ) ] = [ ] , fs: any FSProxy = localFS, bypassActualTasks: Bool = false , targetsBuildInParallel: Bool = true , emitFrontendCommandLines: Bool = false , moduleSessionFilePath: Path ? = nil , invalidationPaths: [ Path ] = [ ] , recursiveSearchPathResults: [ RecursiveSearchPathResolver . CachedResult ] = [ ] , copiedPathMap: [ String : String ] = [ : ] , rootPathsPerTarget: [ ConfiguredTarget : [ Path ] ] = [ : ] , moduleCachePathsPerTarget: [ ConfiguredTarget : [ Path ] ] = [ : ] , artifactInfoPerTarget: [ ConfiguredTarget : ArtifactInfo ] = [ : ] , casValidationInfos: [ BuildDescription . CASValidationInfo ] = [ ] , staleFileRemovalIdentifierPerTarget: [ ConfiguredTarget ? : String ] = [ : ] , settingsPerTarget: [ ConfiguredTarget : Settings ] = [ : ] , delegate: any BuildDescriptionConstructionDelegate , targetDependencies: [ TargetDependencyRelationship ] = [ ] , definingTargetsByModuleName: [ String : OrderedSet < ConfiguredTarget > ] , capturedBuildInfo: CapturedBuildInfo ? , userPreferences: UserPreferences ) async throws -> BuildDescription ? {
1030+ static package func construct( workspace: Workspace , tasks: [ any PlannedTask ] , path: Path , signature: BuildDescriptionSignature , buildCommand: BuildCommand , diagnostics: [ ConfiguredTarget ? : [ Diagnostic ] ] = [ : ] , indexingInfo: [ ( forTarget: ConfiguredTarget ? , path: Path , indexingInfo: any SourceFileIndexingInfo ) ] = [ ] , fs: any FSProxy = localFS, bypassActualTasks: Bool = false , targetsBuildInParallel: Bool = true , emitFrontendCommandLines: Bool = false , moduleSessionFilePath: Path ? = nil , invalidationPaths: [ Path ] = [ ] , recursiveSearchPathResults: [ RecursiveSearchPathResolver . CachedResult ] = [ ] , copiedPathMap: [ String : String ] = [ : ] , rootPathsPerTarget: [ ConfiguredTarget : [ Path ] ] = [ : ] , moduleCachePathsPerTarget: [ ConfiguredTarget : [ Path ] ] = [ : ] , artifactInfoPerTarget: [ ConfiguredTarget : ArtifactInfo ] = [ : ] , casValidationInfos: [ BuildDescription . CASValidationInfo ] = [ ] , staleFileRemovalIdentifierPerTarget: [ ConfiguredTarget ? : String ] = [ : ] , settingsPerTarget: [ ConfiguredTarget : Settings ] = [ : ] , delegate: any BuildDescriptionConstructionDelegate , targetDependencies: [ TargetDependencyRelationship ] = [ ] , definingTargetsByModuleName: [ String : OrderedSet < ConfiguredTarget > ] , userPreferences: UserPreferences ) async throws -> BuildDescription ? {
10431031 var diagnostics = diagnostics
10441032
10451033 // We operate on the sorted tasks here to ensure that the list of task additional inputs is deterministic.
@@ -1302,7 +1290,7 @@ extension BuildDescription {
13021290 }
13031291
13041292 // Create the builder.
1305- let builder = BuildDescriptionBuilder ( path: path, signature: signature, buildCommand: buildCommand, taskAdditionalInputs: taskAdditionalInputs, mutatedNodes: Set ( mutableNodes. keys) , mutatingTasks: mutatingTasks, bypassActualTasks: bypassActualTasks, targetsBuildInParallel: targetsBuildInParallel, emitFrontendCommandLines: emitFrontendCommandLines, moduleSessionFilePath: moduleSessionFilePath, invalidationPaths: invalidationPaths, recursiveSearchPathResults: recursiveSearchPathResults, copiedPathMap: copiedPathMap, outputPathsPerTarget: outputPathsPerTarget, allOutputPaths: Set ( producers. keys. map { $0. instance. path } ) , rootPathsPerTarget: rootPathsPerTarget, moduleCachePathsPerTarget: moduleCachePathsPerTarget, artifactInfoPerTarget: artifactInfoPerTarget, casValidationInfos: casValidationInfos, staleFileRemovalIdentifierPerTarget: staleFileRemovalIdentifierPerTarget, settingsPerTarget: settingsPerTarget, targetDependencies: targetDependencies, definingTargetsByModuleName: definingTargetsByModuleName, workspace: workspace, capturedBuildInfo: capturedBuildInfo)
1293+ let builder = BuildDescriptionBuilder ( path: path, signature: signature, buildCommand: buildCommand, taskAdditionalInputs: taskAdditionalInputs, mutatedNodes: Set ( mutableNodes. keys) , mutatingTasks: mutatingTasks, bypassActualTasks: bypassActualTasks, targetsBuildInParallel: targetsBuildInParallel, emitFrontendCommandLines: emitFrontendCommandLines, moduleSessionFilePath: moduleSessionFilePath, invalidationPaths: invalidationPaths, recursiveSearchPathResults: recursiveSearchPathResults, copiedPathMap: copiedPathMap, outputPathsPerTarget: outputPathsPerTarget, allOutputPaths: Set ( producers. keys. map { $0. instance. path } ) , rootPathsPerTarget: rootPathsPerTarget, moduleCachePathsPerTarget: moduleCachePathsPerTarget, artifactInfoPerTarget: artifactInfoPerTarget, casValidationInfos: casValidationInfos, staleFileRemovalIdentifierPerTarget: staleFileRemovalIdentifierPerTarget, settingsPerTarget: settingsPerTarget, targetDependencies: targetDependencies, definingTargetsByModuleName: definingTargetsByModuleName, workspace: workspace)
13061294 for (target, diagnostics) in diagnostics {
13071295 let engine = builder. diagnosticsEngines. getOrInsert ( target, { DiagnosticsEngine ( ) } )
13081296 for diag in diagnostics {
0 commit comments