Skip to content

Commit 7c35edb

Browse files
committed
Removed support for Swift 6.0. Now Subprocess requires Swift 6.1.0 and above
1 parent 51e1805 commit 7c35edb

File tree

3 files changed

+6
-82
lines changed

3 files changed

+6
-82
lines changed

[email protected]

Lines changed: 0 additions & 76 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Then, adding the `Subprocess` module to your target dependencies:
2626
)
2727
```
2828

29-
On Swift 6.1 and above, `Subprocess` offers two [package traits](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0450-swiftpm-package-traits.md):
29+
`Subprocess` offers two [package traits](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0450-swiftpm-package-traits.md):
3030

3131
- `SubprocessFoundation`: includes a dependency on `Foundation` and adds extensions on Foundation types like `Data`. This trait is enabled by default.
3232
- `SubprocessSpan`: makes Subprocess’ API, mainly `OutputProtocol`, `RawSpan` based. This trait is enabled whenever `RawSpan` is available and should only be disabled when `RawSpan` is not available.
@@ -35,7 +35,7 @@ Please find the API proposal [here](https://github.com/swiftlang/swift-foundatio
3535

3636
### Swift Versions
3737

38-
The minimal supported Swift version is Swift 6.0.
38+
The minimal supported Swift version is **Swift 6.1**.
3939

4040
To experiment with the `SubprocessSpan` trait, Swift 6.2 is required. Currently, you can download the Swift 6.2 toolchain (`main` development snapshot) [here](https://www.swift.org/install/macos/#development-snapshots).
4141

Sources/Subprocess/Configuration.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -621,10 +621,10 @@ internal struct TrackedFileDescriptor: ~Copyable {
621621
// if another part of the code inadvertently reuses the same file descriptor
622622
// number. This problem is especially concerning on Unix systems due to POSIX’s
623623
// guarantee of using the lowest available file descriptor number, making reuse
624-
// more probable. We use `preconditionFailure` upon receiving `.badFileDescriptor`
624+
// more probable. We use `fatalError` upon receiving `.badFileDescriptor`
625625
// to prevent accidentally closing a different file descriptor.
626626
guard errno != .badFileDescriptor else {
627-
preconditionFailure(
627+
fatalError(
628628
"FileDescriptor \(fileDescriptor.rawValue) is already closed"
629629
)
630630
}
@@ -649,10 +649,10 @@ internal struct TrackedFileDescriptor: ~Copyable {
649649
// if another part of the code inadvertently reuses the same file descriptor
650650
// number. This problem is especially concerning on Unix systems due to POSIX’s
651651
// guarantee of using the lowest available file descriptor number, making reuse
652-
// more probable. We use `preconditionFailure` upon receiving `.badFileDescriptor`
652+
// more probable. We use `fatalError` upon receiving `.badFileDescriptor`
653653
// to prevent accidentally closing a different file descriptor.
654654
guard errno != .badFileDescriptor else {
655-
preconditionFailure(
655+
fatalError(
656656
"FileDescriptor \(fileDescriptor.rawValue) is already closed"
657657
)
658658
}

0 commit comments

Comments
 (0)