Skip to content

Commit 2a62a75

Browse files
authored
Merge pull request #830 from CodaFi/import-what-you-use
[Gardening] Remove and Reformat Foundation Imports
2 parents 7412570 + 757daa5 commit 2a62a75

34 files changed

+19
-27
lines changed

Sources/SwiftDriver/Driver/OutputFileMap.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12+
1213
import TSCBasic
1314
import Foundation
1415

Sources/SwiftDriver/Execution/ProcessProtocol.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12+
1213
import TSCBasic
1314
import Foundation
1415

Sources/SwiftDriver/ExplicitModuleBuilds/ClangVersionedDependencyResolution.swift

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

13-
import Foundation
1413
import TSCBasic
1514

1615
/// A map from a module identifier to a set of module dependency graphs

Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyGraph.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
import Foundation
12+
1313
/// A map from a module identifier to its info
1414
public typealias ModuleInfoMap = [ModuleDependencyId: ModuleInfo]
1515

Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyOracle.swift

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

1313
import TSCBasic
14-
import Foundation
14+
import Dispatch
1515

1616
// An inter-module dependency oracle, responsible for responding to queries about
1717
// dependencies of a given module, caching already-discovered dependencies along the way.

Sources/SwiftDriver/ExplicitModuleBuilds/ModuleDependencyScanning.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12+
1213
import Foundation
1314
import TSCBasic
1415
import SwiftOptions

Sources/SwiftDriver/ExplicitModuleBuilds/SerializableModuleArtifacts.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
import Foundation
1312

1413
/// Describes a given Swift module's pre-built module artifacts:
1514
/// - Swift Module (name)

Sources/SwiftDriver/IncrementalCompilation/DependencyKey.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
import Foundation
1312
import TSCBasic
1413

1514
/// A filename from another module

Sources/SwiftDriver/IncrementalCompilation/FirstWaveComputer.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Foundation
21
//===--------------- FirstWaveComputer.swift - Incremental --------------===//
32
//
43
// This source file is part of the Swift.org open source project
@@ -10,6 +9,8 @@ import Foundation
109
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1110
//
1211
//===----------------------------------------------------------------------===//
12+
13+
import Foundation
1314
import TSCBasic
1415

1516
extension IncrementalCompilationState {

Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationProtectedState.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12+
13+
import Dispatch
1214
import TSCBasic
1315
import TSCUtility
14-
import Foundation
1516
import SwiftOptions
1617

1718

Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12+
13+
import Dispatch
1214
import TSCBasic
1315
import TSCUtility
14-
import Foundation
1516
import SwiftOptions
1617

1718
/// An instance of `IncrementalCompilationState` encapsulates the data necessary

Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import Foundation
2-
import SwiftOptions
31
//===----- IncrementalDependencyAndInputSetup.swift - Incremental --------===//
42
//
53
// This source file is part of the Swift.org open source project
@@ -11,7 +9,10 @@ import SwiftOptions
119
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1210
//
1311
//===----------------------------------------------------------------------===//
12+
1413
import TSCBasic
14+
import Foundation
15+
import SwiftOptions
1516

1617
// Initial incremental state computation
1718
extension IncrementalCompilationState {

Sources/SwiftDriver/IncrementalCompilation/InputInfo.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12+
1213
import Foundation
1314
import TSCBasic
1415

Sources/SwiftDriver/IncrementalCompilation/KeyAndFingerprintHolder.swift

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

13-
import Foundation
1413

1514

1615
/// Encapsulates the invariant required for anything with a DependencyKey and an fingerprint

Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraph.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12+
1213
import Foundation
1314
import TSCBasic
1415
import TSCUtility

Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/DependencySource.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
import Foundation
1312
import TSCBasic
1413

1514
// MARK: - DependencySource

Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Integrator.swift

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

1313
import TSCBasic
14-
import Foundation
1514

1615
extension ModuleDependencyGraph {
1716

Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Node.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
import Foundation
1312
import TSCBasic
1413

1514
// MARK: - ModuleDependencyGraph.Node

Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Tracer.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
import Foundation
1312
import TSCBasic
1413

1514
extension ModuleDependencyGraph {

Sources/SwiftDriver/IncrementalCompilation/SourceFileDependencyGraph.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
import Foundation
1312
import TSCBasic
1413
import TSCUtility
1514

Sources/SwiftDriver/IncrementalCompilation/SwiftSourceFile.swift

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

13-
import Foundation
1413
import TSCBasic
1514

1615
/// Because the incremental compilation system treats files containing Swift source code specially,

Sources/SwiftDriver/Jobs/BackendJob.swift

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

13-
import Foundation
1413

1514
extension Driver {
1615
/// Form a backend job.

Sources/SwiftDriver/Jobs/Job.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12+
1213
import TSCBasic
1314
import Foundation
1415

Sources/SwiftDriver/Toolchains/Toolchain.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12+
1213
import Foundation
1314
import TSCBasic
1415
import SwiftOptions

Sources/SwiftDriver/Utilities/DateAdditions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12+
1213
import Foundation
1314

1415
public extension Date {

Sources/SwiftDriver/Utilities/FileList.swift

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

13-
import Foundation
1413

1514
public enum FileList: Hashable {
1615
/// File of file paths

Tests/IncrementalTestFramework/Module.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import TSCBasic
1414
@_spi(Testing) import SwiftDriver
1515
import SwiftOptions
1616
import TestUtilities
17-
import Foundation
1817
import XCTest
1918

2019
/// Represents a module to be compiled.

Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift

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

13-
import Foundation
1413
@_spi(Testing) import SwiftDriver
1514
import SwiftDriverExecution
1615
import TSCBasic

Tests/SwiftDriverTests/Helpers/MockingIncrementalCompilation.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
@_spi(Testing) import SwiftDriver
1414
import TSCBasic
1515
import TSCUtility
16-
import Foundation
1716
import XCTest
1817

1918
// MARK: - utilities for unit testing

Tests/SwiftDriverTests/Inputs/ExplicitModuleDependencyBuildInputs.swift

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

13-
import Foundation
1413

1514
enum ModuleDependenciesInputs {
1615
static var fastDependencyScannerOutput: String {

Tests/SwiftDriverTests/Inputs/IncrementalCompilationInputs.swift

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

13-
import Foundation
1413

1514
enum Inputs {
1615
static var buildRecord: String {

Tests/SwiftDriverTests/ParsableMessageTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212
import XCTest
13-
import Foundation
1413
import TSCBasic
1514
import TSCUtility
1615

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
import Foundation
1312
@_spi(Testing) import SwiftDriver
1413
import SwiftDriverExecution
1514
import SwiftOptions

Tests/TestUtilities/OutputFileMapCreator.swift

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

1313
import TSCBasic
14-
1514
import Foundation
1615

1716
public struct OutputFileMapCreator {

0 commit comments

Comments
 (0)