|
29 | 29 | import com.google.devtools.build.lib.actions.Artifact; |
30 | 30 | import com.google.devtools.build.lib.actions.DynamicStrategyRegistry; |
31 | 31 | import com.google.devtools.build.lib.actions.DynamicStrategyRegistry.DynamicMode; |
32 | | -import com.google.devtools.build.lib.actions.EnvironmentalExecException; |
33 | 32 | import com.google.devtools.build.lib.actions.ExecException; |
34 | | -import com.google.devtools.build.lib.actions.ExecutionRequirements; |
35 | 33 | import com.google.devtools.build.lib.actions.SandboxedSpawnStrategy; |
36 | 34 | import com.google.devtools.build.lib.actions.Spawn; |
37 | 35 | import com.google.devtools.build.lib.actions.SpawnResult; |
@@ -191,7 +189,6 @@ private static boolean canExecRemote( |
191 | 189 | public ImmutableList<SpawnResult> exec( |
192 | 190 | final Spawn spawn, final ActionExecutionContext actionExecutionContext) |
193 | 191 | throws ExecException, InterruptedException { |
194 | | - DynamicSpawnStrategy.verifyAvailabilityInfo(options, spawn); |
195 | 192 | ImmutableList<SpawnResult> nonDynamicResults = |
196 | 193 | maybeExecuteNonDynamically(spawn, actionExecutionContext); |
197 | 194 | if (nonDynamicResults != null) { |
@@ -270,47 +267,6 @@ private void tryScheduleLocalJob() { |
270 | 267 | } |
271 | 268 | } |
272 | 269 |
|
273 | | - /** |
274 | | - * Checks if the given spawn has the right execution requirements to indicate whether it can |
275 | | - * succeed when running remotely and/or locally depending on the Xcode versions it needs. |
276 | | - * |
277 | | - * @param options the dynamic execution options that configure this check |
278 | | - * @param spawn the spawn to validate |
279 | | - * @throws ExecException if the spawn does not contain the expected execution requirements |
280 | | - */ |
281 | | - static void verifyAvailabilityInfo(DynamicExecutionOptions options, Spawn spawn) |
282 | | - throws ExecException { |
283 | | - if (options.requireAvailabilityInfo |
284 | | - && !options.availabilityInfoExempt.contains(spawn.getMnemonic())) { |
285 | | - if (spawn.getExecutionInfo().containsKey(ExecutionRequirements.REQUIRES_DARWIN) |
286 | | - && !spawn.getExecutionInfo().containsKey(ExecutionRequirements.REQUIREMENTS_SET)) { |
287 | | - String message = |
288 | | - String.format( |
289 | | - "The following spawn was missing Xcode-related execution requirements. Please" |
290 | | - + " let the Bazel team know if you encounter this issue. You can work around" |
291 | | - + " this error by passing --experimental_require_availability_info=false --" |
292 | | - + " at your own risk! This may cause some actions to be executed on the" |
293 | | - + " wrong platform, which can result in build failures.\n" |
294 | | - + "Failing spawn: mnemonic = %s\n" |
295 | | - + "tool files = %s\n" |
296 | | - + "execution platform = %s\n" |
297 | | - + "execution info = %s\n", |
298 | | - spawn.getMnemonic(), |
299 | | - spawn.getToolFiles(), |
300 | | - spawn.getExecutionPlatform(), |
301 | | - spawn.getExecutionInfo()); |
302 | | - |
303 | | - FailureDetail detail = |
304 | | - FailureDetail.newBuilder() |
305 | | - .setMessage(message) |
306 | | - .setDynamicExecution( |
307 | | - DynamicExecution.newBuilder().setCode(Code.XCODE_RELATED_PREREQ_UNMET)) |
308 | | - .build(); |
309 | | - throw new EnvironmentalExecException(detail); |
310 | | - } |
311 | | - } |
312 | | - } |
313 | | - |
314 | 270 | /** |
315 | 271 | * Checks if this action should be executed dynamically, and if not executes it locally or |
316 | 272 | * remotely as applicable, or throws an exception if it cannot be executed at all. |
|
0 commit comments