Skip to content

Commit 717aec7

Browse files
authored
Basics: remove AsyncFileSystem as unused (#6436)
Since `FileSystem` is now `Sendable`, we no longer need to keep `AsyncFileSystem`, which served only as a workaround for non-sendability. It wasn't non-blocking under the hood anyway, and a blocking FS I/O API would have to be designed from scratch anyway, not as a wrapper for the existing blocking APIs. `AsyncFileSystem` actor declaration and its uses were removed. `FileSystem` can be used directly in our async code instead.
1 parent 16fb1d2 commit 717aec7

File tree

5 files changed

+7
-381
lines changed

5 files changed

+7
-381
lines changed

Sources/Basics/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ add_library(Basics
2525
DispatchTimeInterval+Extensions.swift
2626
EnvironmentVariables.swift
2727
Errors.swift
28-
FileSystem/AsyncFileSystem.swift
2928
FileSystem/FileSystem+Extensions.swift
3029
FileSystem/Path+Extensions.swift
3130
FileSystem/TemporaryFile.swift

Sources/Basics/FileSystem/AsyncFileSystem.swift

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

Sources/Basics/HTTPClient/HTTPClientRequest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public struct HTTPClientRequest: Sendable {
5252
url: URL,
5353
headers: HTTPClientHeaders = .init(),
5454
options: Options = .init(),
55-
fileSystem: AsyncFileSystem,
55+
fileSystem: FileSystem,
5656
destination: AbsolutePath
5757
) -> Self {
5858
self.init(
@@ -75,7 +75,7 @@ public struct HTTPClientRequest: Sendable {
7575

7676
public enum Kind: Sendable {
7777
case generic(HTTPMethod)
78-
case download(fileSystem: AsyncFileSystem, destination: AbsolutePath)
78+
case download(fileSystem: FileSystem, destination: AbsolutePath)
7979
}
8080

8181
public struct Options: Sendable {

0 commit comments

Comments
 (0)