Skip to content

Commit

Permalink
Fix build failure on Swift Playgrounds
Browse files Browse the repository at this point in the history
The PR apple#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.
  • Loading branch information
kkebo committed Oct 14, 2024
1 parent 4c3ea81 commit ad84e42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// swift-tools-version: 5.8

import Foundation
import PackageDescription

let package = Package(
Expand Down Expand Up @@ -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"),
Expand Down

0 comments on commit ad84e42

Please sign in to comment.