Skip to content

Commit 67e3d7a

Browse files
committed
Block the package from building on iOS-derived platforms
Process spawning is not available there. Also remove a couple overly-specific platform conditions in tests that would be incorrect on other Unix-like platforms such as Android and FreeBSD.
1 parent 0f9a610 commit 67e3d7a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import PackageDescription
55

66
let availabilityMacro: SwiftSetting = .enableExperimentalFeature(
7-
"AvailabilityMacro=SubprocessSpan: macOS 9999",
7+
"AvailabilityMacro=SubprocessSpan: macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, visionOS 9999",
88
)
99

1010
var dep: [Package.Dependency] = [
@@ -31,7 +31,7 @@ defaultTraits.insert("SubprocessSpan")
3131

3232
let package = Package(
3333
name: "Subprocess",
34-
platforms: [.macOS(.v13)],
34+
platforms: [.macOS(.v13), .iOS("99.0")],
3535
products: [
3636
.library(
3737
name: "Subprocess",

Tests/SubprocessTests/SubprocessTests+Linting.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private func enableLintingTest() -> Bool {
2525
} catch {
2626
return false
2727
}
28-
#elseif os(Linux) || os(Windows)
28+
#else
2929
// Use swift-format directly
3030
do {
3131
_ = try Executable.name("swift-format")
@@ -66,7 +66,7 @@ struct SubprocessLintingTest {
6666
executable: .path("/usr/bin/xcrun"),
6767
arguments: ["swift-format", "lint", "-s", "--recursive", sourcePath]
6868
)
69-
#elseif os(Linux) || os(Windows)
69+
#else
7070
let configuration = Configuration(
7171
executable: .name("swift-format"),
7272
arguments: ["lint", "-s", "--recursive", sourcePath]

0 commit comments

Comments
 (0)