@@ -50,6 +50,7 @@ public struct BuildManifest {
50
50
inputs: [ Node ] ,
51
51
outputs: [ Node ]
52
52
) {
53
+ assert ( commands [ name] == nil , " aleady had a command named ' \( name) ' " )
53
54
let tool = PhonyTool ( inputs: inputs, outputs: outputs)
54
55
commands [ name] = Command ( name: name, tool: tool)
55
56
}
@@ -59,6 +60,7 @@ public struct BuildManifest {
59
60
inputs: [ Node ] ,
60
61
outputs: [ Node ]
61
62
) {
63
+ assert ( commands [ name] == nil , " aleady had a command named ' \( name) ' " )
62
64
let tool = TestDiscoveryTool ( inputs: inputs, outputs: outputs)
63
65
commands [ name] = Command ( name: name, tool: tool)
64
66
}
@@ -68,6 +70,7 @@ public struct BuildManifest {
68
70
inputs: [ Node ] ,
69
71
outputs: [ Node ]
70
72
) {
73
+ assert ( commands [ name] == nil , " aleady had a command named ' \( name) ' " )
71
74
let tool = CopyTool ( inputs: inputs, outputs: outputs)
72
75
commands [ name] = Command ( name: name, tool: tool)
73
76
}
@@ -77,6 +80,7 @@ public struct BuildManifest {
77
80
inputs: [ Node ] ,
78
81
outputs: [ Node ]
79
82
) {
83
+ assert ( commands [ name] == nil , " aleady had a command named ' \( name) ' " )
80
84
let tool = PackageStructureTool ( inputs: inputs, outputs: outputs)
81
85
commands [ name] = Command ( name: name, tool: tool)
82
86
}
@@ -86,6 +90,7 @@ public struct BuildManifest {
86
90
inputs: [ Node ] ,
87
91
outputs: [ Node ]
88
92
) {
93
+ assert ( commands [ name] == nil , " aleady had a command named ' \( name) ' " )
89
94
let tool = ArchiveTool ( inputs: inputs, outputs: outputs)
90
95
commands [ name] = Command ( name: name, tool: tool)
91
96
}
@@ -100,6 +105,7 @@ public struct BuildManifest {
100
105
workingDirectory: String ? = nil ,
101
106
allowMissingInputs: Bool = false
102
107
) {
108
+ assert ( commands [ name] == nil , " aleady had a command named ' \( name) ' " )
103
109
let tool = ShellTool (
104
110
description: description,
105
111
inputs: inputs,
@@ -120,6 +126,7 @@ public struct BuildManifest {
120
126
outputs: [ Node ] ,
121
127
arguments: [ String ]
122
128
) {
129
+ assert ( commands [ name] == nil , " aleady had a command named ' \( name) ' " )
123
130
let tool = SwiftFrontendTool (
124
131
moduleName: moduleName,
125
132
description: description,
@@ -138,6 +145,7 @@ public struct BuildManifest {
138
145
arguments: [ String ] ,
139
146
dependencies: String ? = nil
140
147
) {
148
+ assert ( commands [ name] == nil , " aleady had a command named ' \( name) ' " )
141
149
let tool = ClangTool (
142
150
description: description,
143
151
inputs: inputs,
@@ -163,6 +171,7 @@ public struct BuildManifest {
163
171
isLibrary: Bool ,
164
172
wholeModuleOptimization: Bool
165
173
) {
174
+ assert ( commands [ name] == nil , " aleady had a command named ' \( name) ' " )
166
175
let tool = SwiftCompilerTool (
167
176
inputs: inputs,
168
177
outputs: outputs,
@@ -177,7 +186,6 @@ public struct BuildManifest {
177
186
isLibrary: isLibrary,
178
187
wholeModuleOptimization: wholeModuleOptimization
179
188
)
180
-
181
189
commands [ name] = Command ( name: name, tool: tool)
182
190
}
183
191
}
0 commit comments