Skip to content

Commit 472187a

Browse files
committed
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.
1 parent 6c050d5 commit 472187a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// swift-tools-version: 6.2
22

3+
import Foundation
34
import PackageDescription
45
import CompilerPluginSupport
56

@@ -93,7 +94,7 @@ let package = Package(
9394
]
9495
)
9596

96-
if Context.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
97+
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
9798
package.dependencies += [
9899
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0")
99100
]

Package@swift-5.8.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// swift-tools-version: 5.8
22

3+
import Foundation
34
import PackageDescription
45
import CompilerPluginSupport
56

@@ -87,7 +88,7 @@ let package = Package(
8788
]
8889
)
8990

90-
if Context.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
91+
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
9192
package.dependencies += [
9293
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0")
9394
]

0 commit comments

Comments
 (0)