File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -90,17 +90,16 @@ extension Driver {
9090 incrementalCompilationState = nil
9191 }
9292
93- let batchedJobs : [ Job ]
94- // If the jobs are batched during the incremental build, reuse the computation rather than computing the batches again.
95- if let incrementalState = incrementalCompilationState {
96- batchedJobs = incrementalState. mandatoryJobsInOrder + incrementalState. jobsAfterCompiles
97- } else {
98- batchedJobs = try formBatchedJobs ( jobsInPhases. allJobs,
99- showJobLifecycle: showJobLifecycle,
100- jobCreatingPch: jobsInPhases. allJobs. first ( where: { $0. kind == . generatePCH} ) )
101- }
102-
103- return ( batchedJobs, incrementalCompilationState)
93+ return try (
94+ // For compatibility with swiftpm, the driver produces batched jobs
95+ // for every job, even when run in incremental mode, so that all jobs
96+ // can be returned from `planBuild`.
97+ // But in that case, don't emit lifecycle messages.
98+ formBatchedJobs ( jobsInPhases. allJobs,
99+ showJobLifecycle: showJobLifecycle && incrementalCompilationState == nil ,
100+ jobCreatingPch: jobsInPhases. allJobs. first ( where: { $0. kind == . generatePCH} ) ) ,
101+ incrementalCompilationState
102+ )
104103 }
105104
106105 /// If performing an explicit module build, compute an inter-module dependency graph.
You can’t perform that action at this time.
0 commit comments