in Sources/LLBBuildSystem/Functions/Execution/Action.swift [260:281]
func requestInputs(_ artifacts: [LLBArtifact], _ ctx: Context) -> LLBFuture<[(LLBArtifact, LLBArtifactValue)]> {
let requestFutures = artifacts.map { artifact in
self.requestArtifact(artifact, ctx).map { (artifact, $0) }
}
return LLBFuture.whenAllComplete(requestFutures, on: ctx.group.next()).flatMapThrowing { results in
for result in results {
switch result {
case .failure(let error):
if case LLBActionError.dependencyFailure = error {
throw error
} else {
throw LLBActionError.dependencyFailure(error)
}
default:
break
}
}
// Should not throw since we would have already thrown when searching for errors above.
return try results.map { try $0.get() }
}
}