Skip to content

Commit f61175a

Browse files
authored
[NFC] Remove TSCBasic.InMemoryFileSystem dependency (#7484)
### Motivation: As we'd like to quickly iterate on asyncification of our file system code and since TSC package is deprecated we should reduce our number of dependencies on it. ### Modifications: Removed `import class TSCBasic.InMemoryFileSystem` statements. ### Result: We have less dependencies on the TSC package.
1 parent 9a718f6 commit f61175a

File tree

55 files changed

+62
-147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+62
-147
lines changed

Benchmarks/Benchmarks/PackageGraphBenchmarks/PackageGraphBenchmarks.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import PackageModel
77
@_spi(DontAdoptOutsideOfSwiftPMExposedForBenchmarksAndTestsOnly)
88
import func PackageGraph.loadModulesGraph
99

10-
import class TSCBasic.InMemoryFileSystem
1110
import Workspace
1211

1312
let benchmarks = {

Sources/Basics/SQLiteBackedCache.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import Foundation
1414

1515
import protocol TSCBasic.Closable
16-
import class TSCBasic.InMemoryFileSystem
1716
import var TSCBasic.localFileSystem
1817

1918
/// SQLite backed persistent cache.

Sources/PackageCollections/Storage/SQLitePackageCollectionsStorage.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2020-2023 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2020-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -20,7 +20,6 @@ import struct Foundation.URL
2020
import PackageModel
2121

2222
import protocol TSCBasic.Closable
23-
import class TSCBasic.InMemoryFileSystem
2423

2524
final class SQLitePackageCollectionsStorage: PackageCollectionsStorage, Closable {
2625
private static let packageCollectionsTableName = "package_collections"

Sources/Workspace/PackageContainer/RegistryPackageContainer.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2021 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2021-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -17,8 +17,6 @@ import PackageLoading
1717
import PackageModel
1818
import PackageRegistry
1919

20-
import class TSCBasic.InMemoryFileSystem
21-
2220
import struct TSCUtility.Version
2321

2422
public class RegistryPackageContainer: PackageContainer {

Sources/Workspace/Workspace+Editing.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2014-2023 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -11,13 +11,13 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import struct Basics.AbsolutePath
14+
import class Basics.InMemoryFileSystem
1415
import class Basics.ObservabilityScope
1516
import struct Basics.RelativePath
1617
import func Basics.temp_await
1718
import struct PackageGraph.PackageGraphRootInput
1819
import struct PackageModel.ProvidedLibrary
1920
import struct SourceControl.Revision
20-
import class TSCBasic.InMemoryFileSystem
2121

2222
extension Workspace {
2323
/// Edit implementation.

Sources/Workspace/Workspace.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import SourceControl
2323

2424
import func TSCBasic.findCycle
2525
import protocol TSCBasic.HashAlgorithm
26-
import class TSCBasic.InMemoryFileSystem
2726
import struct TSCBasic.KeyedPair
2827
import struct TSCBasic.SHA256
2928
import var TSCBasic.stderrStream

Sources/_InternalTestSupport/MockPackageGraphs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import struct Basics.AbsolutePath
14+
import class Basics.InMemoryFileSystem
1415
import class Basics.ObservabilitySystem
1516
import class Basics.ObservabilityScope
1617

@@ -24,7 +25,6 @@ import struct PackageModel.ProductDescription
2425
import enum PackageModel.ProductType
2526
import struct PackageModel.TargetDescription
2627
import protocol TSCBasic.FileSystem
27-
import class TSCBasic.InMemoryFileSystem
2828

2929
package typealias MockPackageGraph = (
3030
graph: ModulesGraph,

Tests/BasicsTests/Archiver/TarArchiverTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2014-2023 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -15,7 +15,6 @@ import TSCclibc // for SPM_posix_spawn_file_actions_addchdir_np_supported
1515
import _InternalTestSupport
1616
import XCTest
1717

18-
import class TSCBasic.InMemoryFileSystem
1918
import struct TSCBasic.FileSystemError
2019

2120
final class TarArchiverTests: XCTestCase {

Tests/BasicsTests/Archiver/UniversalArchiverTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2014-2023 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -15,7 +15,6 @@ import TSCclibc // for SPM_posix_spawn_file_actions_addchdir_np_supported
1515
import _InternalTestSupport
1616
import XCTest
1717

18-
import class TSCBasic.InMemoryFileSystem
1918
import struct TSCBasic.FileSystemError
2019

2120
final class UniversalArchiverTests: XCTestCase {

Tests/BasicsTests/Archiver/ZipArchiverTests.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2014-2022 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -15,10 +15,9 @@ import _InternalTestSupport
1515
import XCTest
1616
import TSCclibc // for SPM_posix_spawn_file_actions_addchdir_np_supported
1717

18-
import class TSCBasic.InMemoryFileSystem
1918
import struct TSCBasic.FileSystemError
2019

21-
class ZipArchiverTests: XCTestCase {
20+
final class ZipArchiverTests: XCTestCase {
2221
func testZipArchiverSuccess() async throws {
2322
try await testWithTemporaryDirectory { tmpdir in
2423
let archiver = ZipArchiver(fileSystem: localFileSystem)

0 commit comments

Comments
 (0)