@@ -54,10 +54,10 @@ extension IncrementalCompilationState {
5454
5555 public func compute( batchJobFormer: inout Driver ) throws -> FirstWave {
5656 return try blockingConcurrentAccessOrMutation {
57- let ( initiallySkippedCompileGroups , mandatoryJobsInOrder) =
57+ let ( initiallySkippedCompileJobs , mandatoryJobsInOrder) =
5858 try computeInputsAndGroups ( batchJobFormer: & batchJobFormer)
5959 return FirstWave (
60- initiallySkippedCompileGroups : initiallySkippedCompileGroups ,
60+ initiallySkippedCompileJobs : initiallySkippedCompileJobs ,
6161 mandatoryJobsInOrder: mandatoryJobsInOrder)
6262 }
6363 }
@@ -76,33 +76,33 @@ extension IncrementalCompilationState.FirstWaveComputer {
7676 /// At this stage the graph will have all external dependencies found in the swiftDeps or in the priors
7777 /// listed in fingerprintExternalDependencies.
7878 private func computeInputsAndGroups( batchJobFormer: inout Driver )
79- throws -> ( initiallySkippedCompileGroups : [ TypedVirtualPath : CompileJobGroup ] ,
79+ throws -> ( initiallySkippedCompileJobs : [ TypedVirtualPath : Job ] ,
8080 mandatoryJobsInOrder: [ Job ] )
8181 {
82- let compileGroups =
82+ let compileJobs =
8383 Dictionary ( uniqueKeysWithValues:
84- jobsInPhases. compileGroups . map { ( $0. primaryInput , $0) } )
84+ jobsInPhases. compileJobs . map { ( $0. primaryInputs [ 0 ] , $0) } )
8585 let buildRecord = self . moduleDependencyGraph. buildRecord
8686 let jobCreatingPch = jobsInPhases. beforeCompiles. first ( where: { $0. kind == . generatePCH} )
8787 guard !buildRecord. inputInfos. isEmpty else {
8888 func everythingIsMandatory( )
89- throws -> ( initiallySkippedCompileGroups : [ TypedVirtualPath : CompileJobGroup ] ,
89+ throws -> ( initiallySkippedCompileJobs : [ TypedVirtualPath : Job ] ,
9090 mandatoryJobsInOrder: [ Job ] )
9191 {
92- let mandatoryCompileGroupsInOrder = self . inputFiles. swiftSourceFiles. compactMap {
93- input -> CompileJobGroup ? in
94- compileGroups [ input. typedFile]
92+ let mandatoryCompileJobsInOrder = self . inputFiles. swiftSourceFiles. compactMap {
93+ input -> Job ? in
94+ compileJobs [ input. typedFile]
9595 }
9696
9797 let mandatoryJobsInOrder = try
9898 jobsInPhases. beforeCompiles +
9999 batchJobFormer. formBatchedJobs (
100- mandatoryCompileGroupsInOrder . flatMap { $0 . allJobs ( ) } ,
100+ mandatoryCompileJobsInOrder ,
101101 showJobLifecycle: showJobLifecycle,
102102 jobCreatingPch: jobCreatingPch)
103103
104104 moduleDependencyGraph. setPhase ( to: . buildingAfterEachCompilation)
105- return ( initiallySkippedCompileGroups : [ : ] ,
105+ return ( initiallySkippedCompileJobs : [ : ] ,
106106 mandatoryJobsInOrder: mandatoryJobsInOrder)
107107 }
108108 return try everythingIsMandatory ( )
@@ -114,17 +114,17 @@ extension IncrementalCompilationState.FirstWaveComputer {
114114 moduleDependencyGraph,
115115 buildRecord)
116116
117- let initiallySkippedCompileGroups = compileGroups . filter { initiallySkippedInputs. contains ( $0. key) }
117+ let initiallySkippedCompileJobs = compileJobs . filter { initiallySkippedInputs. contains ( $0. key) }
118118
119- let mandatoryCompileGroupsInOrder = inputFiles. compactMap {
120- input -> CompileJobGroup ? in
119+ let mandatoryCompileJobsInOrder = inputFiles. compactMap {
120+ input -> Job ? in
121121 initiallySkippedInputs. contains ( input)
122122 ? nil
123- : compileGroups [ input]
123+ : compileJobs [ input]
124124 }
125125
126126 let batchedCompilationJobs = try batchJobFormer. formBatchedJobs (
127- mandatoryCompileGroupsInOrder . flatMap { $0 . allJobs ( ) } ,
127+ mandatoryCompileJobsInOrder ,
128128 showJobLifecycle: showJobLifecycle,
129129 jobCreatingPch: jobCreatingPch)
130130
@@ -133,7 +133,7 @@ extension IncrementalCompilationState.FirstWaveComputer {
133133 // have any dependencies on them.
134134 let skipAllJobs = batchedCompilationJobs. isEmpty ? !nonVerifyAfterCompileJobsDependOnBeforeCompileJobs( ) : false
135135 let mandatoryJobsInOrder = skipAllJobs ? [ ] : jobsInPhases. beforeCompiles + batchedCompilationJobs
136- return ( initiallySkippedCompileGroups : initiallySkippedCompileGroups ,
136+ return ( initiallySkippedCompileJobs : initiallySkippedCompileJobs ,
137137 mandatoryJobsInOrder: mandatoryJobsInOrder)
138138 }
139139
@@ -156,7 +156,7 @@ extension IncrementalCompilationState.FirstWaveComputer {
156156 _ moduleDependencyGraph: ModuleDependencyGraph ,
157157 _ buildRecord: BuildRecord
158158 ) -> Set < TypedVirtualPath > {
159- let allGroups = jobsInPhases. compileGroups
159+ let allCompileJobs = jobsInPhases. compileJobs
160160 // Input == source file
161161 let changedInputs = computeChangedInputs ( moduleDependencyGraph, buildRecord)
162162
@@ -176,9 +176,9 @@ extension IncrementalCompilationState.FirstWaveComputer {
176176 reporter. report ( " Has malformed dependency source; will queue " , input)
177177 }
178178 }
179- let inputsMissingOutputs = allGroups . compactMap {
179+ let inputsMissingOutputs = allCompileJobs . compactMap {
180180 $0. outputs. contains { ( try ? !fileSystem. exists ( $0. file) ) ?? true }
181- ? $0. primaryInput
181+ ? $0. primaryInputs [ 0 ]
182182 : nil
183183 }
184184 if let reporter = reporter {
@@ -257,8 +257,8 @@ extension IncrementalCompilationState.FirstWaveComputer {
257257 _ moduleDependencyGraph: ModuleDependencyGraph ,
258258 _ outOfDateBuildRecord: BuildRecord
259259 ) -> [ ChangedInput ] {
260- jobsInPhases. compileGroups . compactMap { group in
261- let input = group . primaryInput
260+ jobsInPhases. compileJobs . compactMap { job in
261+ let input = job . primaryInputs [ 0 ]
262262 let modDate = buildRecordInfo. compilationInputModificationDates [ input] ?? . distantFuture
263263 let inputInfo = outOfDateBuildRecord. inputInfos [ input. file]
264264 let previousCompilationStatus = inputInfo? . status ?? . newlyAdded
0 commit comments