Skip to content

Commit 314fb0a

Browse files
committed
Remove TSCBasic.InMemoryFileSystem dependency
Since #7483 this type is implemented in SwiftPM.
1 parent d91abb3 commit 314fb0a

File tree

60 files changed

+68
-160
lines changed

Some content is hidden

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

60 files changed

+68
-160
lines changed

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/SPMTestSupport/InMemoryGitRepository.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-2017 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
@@ -18,7 +18,6 @@ import SourceControl
1818
import struct TSCBasic.ByteString
1919
import enum TSCBasic.FileMode
2020
import struct TSCBasic.FileSystemError
21-
import class TSCBasic.InMemoryFileSystem
2221

2322
/// The error encountered during in memory git repository operations.
2423
package enum InMemoryGitRepositoryError: Swift.Error {

Sources/SPMTestSupport/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

@@ -23,7 +24,6 @@ import class PackageModel.Manifest
2324
import struct PackageModel.ProductDescription
2425
import struct PackageModel.TargetDescription
2526
import protocol TSCBasic.FileSystem
26-
import class TSCBasic.InMemoryFileSystem
2727

2828
package typealias MockPackageGraph = (
2929
graph: ModulesGraph,

Sources/SPMTestSupport/MockWorkspace.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) 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
@@ -19,8 +19,6 @@ import SourceControl
1919
import Workspace
2020
import XCTest
2121

22-
import class TSCBasic.InMemoryFileSystem
23-
2422
import struct TSCUtility.Version
2523

2624
package final class MockWorkspace {

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.LibraryMetadata
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

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 SPMTestSupport
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 SPMTestSupport
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 SPMTestSupport
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)

Tests/BasicsTests/FileSystem/FileSystemTests.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,18 @@
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
99
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
1413
@testable import Basics
1514
import TSCTestSupport
1615
import XCTest
1716

18-
import class TSCBasic.InMemoryFileSystem
19-
2017
final class FileSystemTests: XCTestCase {
2118
func testStripFirstLevelComponent() throws {
2219
let fileSystem = InMemoryFileSystem()

Tests/BasicsTests/SandboxTests.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) 2021-2022 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
@@ -18,7 +18,6 @@ import XCTest
1818
import Darwin
1919
#endif
2020

21-
import class TSCBasic.InMemoryFileSystem
2221
import class TSCBasic.Process
2322
import struct TSCBasic.ProcessResult
2423

Tests/BuildTests/BuildOperationTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import SPMBuildCore
2424
import XCTest
2525

2626
import class TSCBasic.BufferedOutputByteStream
27-
import class TSCBasic.InMemoryFileSystem
2827

2928
final class BuildOperationTests: XCTestCase {
3029
func testDetectUnexpressedDependencies() throws {

Tests/BuildTests/BuildPlanTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import Workspace
2828
import XCTest
2929

3030
import struct TSCBasic.ByteString
31-
import class TSCBasic.InMemoryFileSystem
3231

3332
import enum TSCUtility.Diagnostics
3433

Tests/BuildTests/CrossCompilationBuildPlanTests.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 Build.BuildPlan
1617
import class Build.ProductBuildDescription
@@ -31,7 +32,6 @@ import func SPMTestSupport.trivialPackageGraph
3132
import struct SPMTestSupport.BuildPlanResult
3233
import func SPMTestSupport.XCTAssertMatch
3334
import func SPMTestSupport.XCTAssertNoDiagnostics
34-
import class TSCBasic.InMemoryFileSystem
3535

3636
import XCTest
3737

Tests/BuildTests/LLBuildManifestBuilderTests.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) 2015-2023 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2015-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
@@ -22,7 +22,6 @@ import struct SPMBuildCore.BuildParameters
2222

2323
import SPMTestSupport
2424

25-
import class TSCBasic.InMemoryFileSystem
2625
import XCTest
2726

2827
final class LLBuildManifestBuilderTests: XCTestCase {

Tests/BuildTests/ModuleAliasingBuildTests.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) 2022 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2022-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
@@ -24,8 +24,6 @@ import SwiftDriver
2424
import Workspace
2525
import XCTest
2626

27-
import class TSCBasic.InMemoryFileSystem
28-
2927
final class ModuleAliasingBuildTests: XCTestCase {
3028
func testModuleAliasingEmptyAlias() throws {
3129
let fs = InMemoryFileSystem(

Tests/BuildTests/ProductBuildDescriptionTests.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-2021 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
@@ -13,8 +13,8 @@
1313
@testable
1414
import Build
1515

16+
import class Basics.InMemoryFileSystem
1617
import class Basics.ObservabilitySystem
17-
import class TSCBasic.InMemoryFileSystem
1818

1919
import class PackageModel.Manifest
2020
import struct PackageModel.TargetDescription

Tests/CommandsTests/MermaidPackageSerializerTests.swift

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

13+
import class Basics.InMemoryFileSystem
1314
import class Basics.ObservabilitySystem
1415

1516
@_spi(DontAdoptOutsideOfSwiftPMExposedForBenchmarksAndTestsOnly)
@@ -18,7 +19,6 @@ import func PackageGraph.loadModulesGraph
1819
import class PackageModel.Manifest
1920
import struct PackageModel.ProductDescription
2021
import struct PackageModel.TargetDescription
21-
import class TSCBasic.InMemoryFileSystem
2222
import func SPMTestSupport.XCTAssertNoDiagnostics
2323

2424
@testable

Tests/CommandsTests/MultiRootSupportTests.swift

Lines changed: 1 addition & 4 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-2019 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
@@ -16,10 +16,7 @@ import SPMTestSupport
1616
import Workspace
1717
import XCTest
1818

19-
import class TSCBasic.InMemoryFileSystem
20-
2119
final class MultiRootSupportTests: CommandsTestCase {
22-
2320
func testWorkspaceLoader() throws {
2421
let fs = InMemoryFileSystem(emptyFiles: [
2522
"/tmp/test/dep/Package.swift",

Tests/CommandsTests/PackageCommandTests.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-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
@@ -32,7 +32,6 @@ import XCTest
3232

3333
import struct TSCBasic.ByteString
3434
import class TSCBasic.BufferedOutputByteStream
35-
import class TSCBasic.InMemoryFileSystem
3635
import enum TSCBasic.JSON
3736
import class TSCBasic.Process
3837

Tests/LLBuildManifestTests/LLBuildManifestTests.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-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,12 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import struct Basics.AbsolutePath
14+
import class Basics.InMemoryFileSystem
1415
import class Foundation.PropertyListDecoder
1516
@testable import LLBuildManifest
1617
import SPMTestSupport
17-
import class TSCBasic.InMemoryFileSystem
1818
import XCTest
1919

20-
2120
private let testEntitlement = "test-entitlement"
2221

2322
final class LLBuildManifestTests: XCTestCase {

0 commit comments

Comments
 (0)