From b70d5d356c7189181ad1b2417942d6964b5cd1fe Mon Sep 17 00:00:00 2001 From: STREGA Date: Sat, 30 Sep 2023 07:01:07 -0400 Subject: [PATCH] Add workaround for macOS 14 --- Sources/CartonHelpers/DefaultToolchain.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Sources/CartonHelpers/DefaultToolchain.swift b/Sources/CartonHelpers/DefaultToolchain.swift index 5a31bbe..36480fe 100644 --- a/Sources/CartonHelpers/DefaultToolchain.swift +++ b/Sources/CartonHelpers/DefaultToolchain.swift @@ -12,4 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -public let defaultToolchainVersion = "wasm-5.9.0-RELEASE" +// TODO: make this `public let defaultToolchainVersion = "wasm-5.9.0-RELEASE"` +// After a stable wasm-5.9 is released +public let defaultToolchainVersion: String = { + // On macOS 14 (Sonoma) it's not possible to use Xcode older then 15.0 + // Therefore Swift 5.9 is required on Sonoma + if #available(macOS 14, *) { + return "wasm-5.9-SNAPSHOT-2023-08-01-a" + }else{ + // Use the latest stable release otherwise + return "wasm-5.8.0-RELEASE" + } +}()