@@ -27,6 +27,11 @@ public protocol DriverExecutor {
27
27
forceResponseFiles: Bool ,
28
28
recordedInputMetadata: [ TypedVirtualPath : FileMetadata ] ) throws -> ProcessResult
29
29
30
+ func execute( job: Job ,
31
+ forceResponseFiles: Bool ,
32
+ recordedInputModificationDates: [ TypedVirtualPath : TimePoint ] ) throws -> ProcessResult
33
+
34
+
30
35
/// Execute multiple jobs, tracking job status using the provided execution delegate.
31
36
/// Pass in the `IncrementalCompilationState` to allow for incremental compilation.
32
37
/// Pass in the `InterModuleDependencyGraph` to allow for module dependency tracking.
@@ -37,6 +42,13 @@ public protocol DriverExecutor {
37
42
recordedInputMetadata: [ TypedVirtualPath : FileMetadata ]
38
43
) throws
39
44
45
+ func execute( workload: DriverExecutorWorkload ,
46
+ delegate: JobExecutionDelegate ,
47
+ numParallelJobs: Int ,
48
+ forceResponseFiles: Bool ,
49
+ recordedInputModificationDates: [ TypedVirtualPath : TimePoint ]
50
+ ) throws
51
+
40
52
/// Execute multiple jobs, tracking job status using the provided execution delegate.
41
53
func execute( jobs: [ Job ] ,
42
54
delegate: JobExecutionDelegate ,
@@ -45,6 +57,13 @@ public protocol DriverExecutor {
45
57
recordedInputMetadata: [ TypedVirtualPath : FileMetadata ]
46
58
) throws
47
59
60
+ func execute( jobs: [ Job ] ,
61
+ delegate: JobExecutionDelegate ,
62
+ numParallelJobs: Int ,
63
+ forceResponseFiles: Bool ,
64
+ recordedInputModificationDates: [ TypedVirtualPath : TimePoint ]
65
+ ) throws
66
+
48
67
/// Launch a process with the given command line and report the result.
49
68
@discardableResult
50
69
func checkNonZeroExit( args: String ... , environment: [ String : String ] ) throws -> String
@@ -53,6 +72,34 @@ public protocol DriverExecutor {
53
72
func description( of job: Job , forceResponseFiles: Bool ) throws -> String
54
73
}
55
74
75
+ extension DriverExecutor {
76
+ public func execute( job: Job ,
77
+ forceResponseFiles: Bool ,
78
+ recordedInputMetadata: [ TypedVirtualPath : FileMetadata ] ) throws -> ProcessResult
79
+ {
80
+ return try execute ( job: job, forceResponseFiles: forceResponseFiles, recordedInputModificationDates: recordedInputMetadata. mapValues { $0. mTime } )
81
+ }
82
+
83
+
84
+ public func execute( workload: DriverExecutorWorkload ,
85
+ delegate: JobExecutionDelegate ,
86
+ numParallelJobs: Int ,
87
+ forceResponseFiles: Bool ,
88
+ recordedInputMetadata: [ TypedVirtualPath : FileMetadata ]
89
+ ) throws {
90
+ try execute ( workload: workload, delegate: delegate, numParallelJobs: numParallelJobs, forceResponseFiles: forceResponseFiles, recordedInputModificationDates: recordedInputMetadata. mapValues { $0. mTime } )
91
+ }
92
+
93
+ public func execute( jobs: [ Job ] ,
94
+ delegate: JobExecutionDelegate ,
95
+ numParallelJobs: Int ,
96
+ forceResponseFiles: Bool ,
97
+ recordedInputMetadata: [ TypedVirtualPath : FileMetadata ]
98
+ ) throws {
99
+ try execute ( jobs: jobs, delegate: delegate, numParallelJobs: numParallelJobs, forceResponseFiles: forceResponseFiles, recordedInputModificationDates: recordedInputMetadata. mapValues { $0. mTime } )
100
+ }
101
+ }
102
+
56
103
public struct DriverExecutorWorkload {
57
104
public let continueBuildingAfterErrors : Bool
58
105
public enum Kind {
@@ -121,14 +168,14 @@ extension DriverExecutor {
121
168
delegate: JobExecutionDelegate ,
122
169
numParallelJobs: Int ,
123
170
forceResponseFiles: Bool ,
124
- recordedInputMetadata : [ TypedVirtualPath : FileMetadata ]
171
+ recordedInputModificationDates : [ TypedVirtualPath : TimePoint ]
125
172
) throws {
126
173
try execute (
127
174
workload: . all( jobs) ,
128
175
delegate: delegate,
129
176
numParallelJobs: numParallelJobs,
130
177
forceResponseFiles: forceResponseFiles,
131
- recordedInputMetadata : recordedInputMetadata )
178
+ recordedInputModificationDates : recordedInputModificationDates )
132
179
}
133
180
134
181
static func computeReturnCode( exitStatus: ProcessResult . ExitStatus ) -> Int {
0 commit comments