From 041a064424bbbc7ce3531cb161c09aa6de259311 Mon Sep 17 00:00:00 2001 From: Artem Chikin Date: Thu, 1 Dec 2022 12:48:45 -0800 Subject: [PATCH] Rephrase use of 'guard let' not supported by older compilers. 'guard let X else {}' works with latest Swift compilers (such as one used in swift-driver CI) but isn't supported in some older compilres used in CI and other bots. --- Sources/SwiftDriver/Jobs/Planning.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftDriver/Jobs/Planning.swift b/Sources/SwiftDriver/Jobs/Planning.swift index c0b42d662..c91f523b2 100644 --- a/Sources/SwiftDriver/Jobs/Planning.swift +++ b/Sources/SwiftDriver/Jobs/Planning.swift @@ -197,10 +197,11 @@ extension Driver { throws { // If asked, add jobs to precompile module dependencies guard parsedOptions.contains(.driverExplicitModuleBuild) else { return } - guard let dependencyGraph else { + guard let resolvedDependencyGraph = dependencyGraph else { fatalError("Attempting to plan explicit dependency build without a dependency graph") } - let modulePrebuildJobs = try generateExplicitModuleDependenciesJobs(dependencyGraph: dependencyGraph) + let modulePrebuildJobs = + try generateExplicitModuleDependenciesJobs(dependencyGraph: resolvedDependencyGraph) modulePrebuildJobs.forEach(addJob) }