From 74ee41950a62ffb2de404151a78340ec67d80027 Mon Sep 17 00:00:00 2001 From: Kenta Kubo <601636+kkebo@users.noreply.github.com> Date: Mon, 14 Oct 2024 23:12:44 +0900 Subject: [PATCH] Fix build failure on Swift Playgrounds The PR #311 introduced `Context.environment`, so that swift-async-algorithm can no longer be used in the Swift Playgrounds. However, `Context.environment` is equivalent to `ProcessInfo.processInfo.environment`, so this is an unnecessary sacrifice. This change is intended to fix that. --- Package.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 1177d22d..94414c24 100644 --- a/Package.swift +++ b/Package.swift @@ -1,5 +1,6 @@ // swift-tools-version: 5.8 +import Foundation import PackageDescription let package = Package( @@ -49,7 +50,7 @@ let package = Package( ] ) -if Context.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil { +if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil { package.dependencies += [ .package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0"), .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),