Skip to content

Commit 802a416

Browse files
committed
[build-system] Rename FallbackBuildSettingsProvider -> FallbackBuildSystem
1 parent 7f74d4a commit 802a416

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Sources/SKCore/BuildSettingsProviderList.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public final class BuildSettingsProviderList {
1818

1919
/// The build settings providers to try (in order).
2020
public var providers: [BuildSystem] = [
21-
FallbackBuildSettingsProvider()
21+
FallbackBuildSystem()
2222
]
2323

2424
public init() {}

Sources/SKCore/FallbackBuildSettingsProvider.swift renamed to Sources/SKCore/FallbackBuildSystem.swift

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ import LanguageServerProtocol
1414
import Basic
1515
import enum Utility.Platform
1616

17-
/// A simple build settings provider suitable as a fallback when accurate settings are unknown.
18-
public final class FallbackBuildSettingsProvider: BuildSystem {
17+
/// A simple BuildSystem suitable as a fallback when accurate settings are unknown.
18+
public final class FallbackBuildSystem: BuildSystem {
1919

20+
/// The path to the SDK.
2021
lazy var sdkpath: AbsolutePath? = {
21-
if case .darwin? = Platform.currentPlatform {
22-
if let str = try? Process.checkNonZeroExit(args: "/usr/bin/xcrun", "--show-sdk-path", "--sdk", "macosx"), let path = try? AbsolutePath(validating: str.spm_chomp()) {
23-
return path
24-
}
22+
if case .darwin? = Platform.currentPlatform,
23+
let str = try? Process.checkNonZeroExit(
24+
args: "/usr/bin/xcrun", "--show-sdk-path", "--sdk", "macosx"),
25+
let path = try? AbsolutePath(validating: str.spm_chomp())
26+
{
27+
return path
2528
}
2629
return nil
2730
}()

0 commit comments

Comments
 (0)