90dc00f323
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
1.1 KiB
Swift
27 lines
1.1 KiB
Swift
// SwiftToolchainStatus.swift
|
|
// Lyrebird
|
|
//
|
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#if os(macOS)
|
|
|
|
/// Result of probing for a usable Swift toolchain (the Swift scratchpad compiles
|
|
/// snippets by shelling out to `swiftc`, which requires Xcode or the Command Line
|
|
/// Tools). The Graph DSL mode does not need a toolchain, so a `.missing*` status is
|
|
/// a soft condition — it gates only the Swift-compile path. Produced by ``ToolchainProbe``.
|
|
public enum SwiftToolchainStatus: Equatable, Sendable {
|
|
/// `swiftc` and the macOS SDK both resolve — the Swift scratchpad can compile.
|
|
case available
|
|
/// No developer tools at all (`xcode-select -p` fails and `swiftc` is unresolved).
|
|
/// Fix: install the Command Line Tools (`xcode-select --install`) or Xcode.
|
|
case missingDeveloperTools
|
|
/// A developer directory is selected but `swiftc` could not be resolved.
|
|
/// Fix: install/repair Xcode or the Command Line Tools.
|
|
case missingSwiftc
|
|
/// `swiftc` resolves but the macOS SDK does not — usually an incomplete Xcode.
|
|
/// Fix: install a full Xcode.
|
|
case missingSDK
|
|
}
|
|
#endif
|