Skip to content

Commit d06bf64

Browse files
authored
Merge pull request #1017 from rex4539/typos
Fix typos
2 parents 46d90b1 + eae2c74 commit d06bf64

29 files changed

+72
-72
lines changed

Sources/SwiftDriver/Driver/Driver.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public struct Driver {
425425
/// at the beginning.
426426
/// - Parameter env: The environment variables to use. This is a hook for testing;
427427
/// in production, you should use the default argument, which copies the current environment.
428-
/// - Parameter diagnosticsEngine: The diagnotic engine used by the driver to emit errors
428+
/// - Parameter diagnosticsEngine: The diagnostic engine used by the driver to emit errors
429429
/// and warnings.
430430
/// - Parameter fileSystem: The filesystem used by the driver to find resources/SDKs,
431431
/// expand response files, etc. By default this is the local filesystem.
@@ -1049,7 +1049,7 @@ extension Driver {
10491049
content.removeFirst(1)
10501050

10511051
if quoted, content.first == "\"" {
1052-
// Consequtive double quotes inside a quoted string imples one quote
1052+
// Consecutive double quotes inside a quoted string implies one quote
10531053
token.append("\"")
10541054
content.removeFirst(1)
10551055
}
@@ -1196,7 +1196,7 @@ extension Driver {
11961196
let execRelPath = args.removeFirst()
11971197
var driverName = try VirtualPath(path: execRelPath).basenameWithoutExt
11981198

1199-
// Determine if the driver kind is being overriden.
1199+
// Determine if the driver kind is being overridden.
12001200
let driverModeOption = "--driver-mode="
12011201
if let firstArg = args.first, firstArg.hasPrefix(driverModeOption) {
12021202
args.removeFirst()
@@ -2277,7 +2277,7 @@ extension Driver {
22772277
// Retrieve and validate module aliases if passed in
22782278
let moduleAliases = moduleAliasesFromInput(parsedOptions.arguments(for: [.moduleAlias]), with: moduleName, onError: diagnosticsEngine)
22792279

2280-
// If we're not emiting a module, we're done.
2280+
// If we're not emitting a module, we're done.
22812281
if moduleOutputKind == nil {
22822282
return ModuleOutputInfo(output: nil, name: moduleName, nameIsFallback: moduleNameIsFallback, aliases: moduleAliases)
22832283
}
@@ -2983,7 +2983,7 @@ extension Driver {
29832983
return try VirtualPath.intern(path: moduleName.appendingFileTypeExtension(type))
29842984
}
29852985

2986-
/// Determine if the build system has created a Project/ directory for auxilary outputs.
2986+
/// Determine if the build system has created a Project/ directory for auxiliary outputs.
29872987
static func computeProjectDirectoryPath(moduleOutputPath: VirtualPath.Handle?,
29882988
fileSystem: FileSystem) -> VirtualPath.Handle? {
29892989
let potentialProjectDirectory = moduleOutputPath

Sources/SwiftDriver/Driver/OutputFileMap.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public struct OutputFileMap: Hashable, Codable {
150150
try fileSystem.writeFileContents(file, bytes: ByteString(contents))
151151
}
152152

153-
/// Human-readable texual representation
153+
/// Human-readable textual representation
154154
var description: String {
155155
var result = ""
156156
func outputPairDescription(inputPath: VirtualPath.Handle, outputPair: (FileType, VirtualPath.Handle))

Sources/SwiftDriver/ExplicitModuleBuilds/ExplicitDependencyBuildPlanner.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
8888
/// ClangD: (10.10, 10.13)
8989
///
9090
/// Due to this requirement, we generate jobs for main main module dependencies in two stages:
91-
/// 1. Generate jobs for all Swift modules, accumulating, for each Clang dependency, the dependending Swift
91+
/// 1. Generate jobs for all Swift modules, accumulating, for each Clang dependency, the depending Swift
9292
/// module's target version (PCM Args).
9393
/// 2. Generate jobs for all Clang modules, now that we have each module's set of PCM versions it must be
9494
/// built against.
@@ -278,7 +278,7 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
278278
type: .swiftModule))
279279
}
280280
}
281-
// Clang module depenencies are specified on the command line eplicitly
281+
// Clang module dependencies are specified on the command line explicitly
282282
for moduleArtifactInfo in clangDependencyArtifacts {
283283
let clangModulePath =
284284
TypedVirtualPath(file: moduleArtifactInfo.modulePath.path,
@@ -327,7 +327,7 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
327327
try targetEncodedClangModuleFilePath(for: dependencyInfo,
328328
hashParts: getPCMHashParts(pcmArgs: pcmArgs,
329329
contextHash: dependencyClangModuleDetails.contextHash))
330-
// Accumulate the requried information about this dependency
330+
// Accumulate the required information about this dependency
331331
clangDependencyArtifacts.append(
332332
ClangModuleArtifactInfo(name: dependencyId.moduleName,
333333
modulePath: TextualVirtualPath(path: clangModulePath),
@@ -338,7 +338,7 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
338338
let isFramework = prebuiltModuleDetails.isFramework ?? false
339339
let swiftModulePath: TypedVirtualPath =
340340
.init(file: compiledModulePath.path, type: .swiftModule)
341-
// Accumulate the requried information about this dependency
341+
// Accumulate the required information about this dependency
342342
// TODO: add .swiftdoc and .swiftsourceinfo for this module.
343343
swiftDependencyArtifacts.append(
344344
SwiftModuleArtifactInfo(name: dependencyId.moduleName,
@@ -399,7 +399,7 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
399399
return results
400400
}
401401

402-
// We need this to enable explict modules in the driver-as-executable mode. For instance,
402+
// We need this to enable explicit modules in the driver-as-executable mode. For instance,
403403
// we have two Swift targets A and B, where A depends on X.pcm which in turn depends on Y.pcm,
404404
// and B only depends on Y.pcm. In the driver-as-executable mode, the build system isn't aware
405405
// of the shared dependency of Y.pcm so it will be generated multiple times. If all these Y.pcm

Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/CommonDependencyOperations.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import TSCBasic
1919
throws {
2020
for (externalModuleId, externalModuleDetails) in externalTargetModuleDetailsMap {
2121
let externalModulePath = externalModuleDetails.path
22-
// Replace the occurence of a Swift module to-be-built from source-file
22+
// Replace the occurrence of a Swift module to-be-built from source-file
2323
// to an info that describes a pre-built binary module.
2424
let swiftModuleId: ModuleDependencyId = .swift(externalModuleId.moduleName)
2525
guard let currentInfo = modules[swiftModuleId] else {
@@ -65,7 +65,7 @@ extension InterModuleDependencyGraph {
6565
topologicalIdList.reduce(into: [ModuleDependencyId : Set<ModuleDependencyId>]()) {
6666
$0[$1] = [$1]
6767
}
68-
// Traverse the set of modules in reverse topological order, accimilating transitive closures
68+
// Traverse the set of modules in reverse topological order, assimilating transitive closures
6969
for moduleId in topologicalIdList.reversed() {
7070
for dependencyId in try moduleInfo(of: moduleId).directDependencies! {
7171
transitiveClosureMap[moduleId]!.formUnion(transitiveClosureMap[dependencyId]!)

Sources/SwiftDriver/IncrementalCompilation/DependencyKey.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public struct DependencyKey {
183183
///
184184
/// A "dynamic member lookup" is the Swift frontend's term for lookups that
185185
/// occur against instances of `AnyObject`. Because an `AnyObject` node
186-
/// behaves like `id` in that it can recieve any kind of Objective-C
186+
/// behaves like `id` in that it can receive any kind of Objective-C
187187
/// message, the compiler takes care to log these names separately.
188188
///
189189
/// The `name` parameter is the human-readable base name of the Swift method

Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState+Extensions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ extension IncrementalCompilationState {
4444
let buildRecordInfo: BuildRecordInfo
4545
/// Record about existence and time of the last compile.
4646
let maybeBuildRecord: BuildRecord?
47-
/// A set of inputs invalidated by external chagnes.
47+
/// A set of inputs invalidated by external changes.
4848
let inputsInvalidatedByExternals: TransitivelyInvalidatedSwiftSourceFileSet
4949
/// Compiler options related to incremental builds.
5050
let incrementalOptions: IncrementalCompilationState.Options
@@ -295,7 +295,7 @@ extension IncrementalCompilationState {
295295

296296
// Emits a remark indicating incremental compilation has been disabled.
297297
//
298-
// FIXME: This entrypoint exists for compatiblity with the legacy driver.
298+
// FIXME: This entrypoint exists for compatibility with the legacy driver.
299299
// This message is not necessary, and we should migrate the tests.
300300
func reportIncrementalCompilationHasBeenDisabled(_ why: String) {
301301
report("Incremental compilation has been disabled, \(why)")

Sources/SwiftDriver/IncrementalCompilation/IncrementalCompilationState.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import SwiftOptions
2121
/// using it as an oracle to discover the jobs to execute as the incremental
2222
/// build progresses. After a job completes, call
2323
/// `protectedState.collectJobsDiscoveredToBeNeededAfterFinishing(job:)`
24-
/// to both update the incremental state and recieve an array of jobs that
24+
/// to both update the incremental state and receive an array of jobs that
2525
/// need to be executed in response.
2626
///
2727
/// Jobs become "unstuck" as their inputs become available, or may be discovered

Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ extension IncrementalCompilationState {
175175
func computeInitialStateForPlanning() throws -> InitialStateForPlanning? {
176176
guard sourceFiles.disappeared.isEmpty else {
177177
// Would have to cleanse nodes of disappeared inputs from graph
178-
// and would have to schedule files dependening on defs from disappeared nodes
178+
// and would have to schedule files depending on defs from disappeared nodes
179179
if let reporter = reporter {
180180
reporter.report(
181181
"Incremental compilation has been disabled, "

Sources/SwiftDriver/IncrementalCompilation/KeyAndFingerprintHolder.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ public struct KeyAndFingerprintHolder:
2828
///
2929
/// However, at present, the frontend does not record this information for
3030
/// every Decl; it only records it for the source-file-as-a-whole in the
31-
/// interface hash. The inteface hash is a product of all the tokens that are
31+
/// interface hash. The interface hash is a product of all the tokens that are
3232
/// not inside of function bodies. Thus, if there is no fingerprint, when the
3333
/// frontend creates an interface node,
3434
/// it adds a dependency to it from the implementation source file node (which
35-
/// has the intefaceHash as its fingerprint).
35+
/// has the interfaceHash as its fingerprint).
3636
let fingerprint: InternedString?
3737

3838
init(_ key: DependencyKey, _ fingerprint: InternedString?) throws {

Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraph.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import struct TSCUtility.Version
2424
// MARK: - ModuleDependencyGraph
2525

2626
/// Holds all the dependency relationships in this module, and declarations in other modules that
27-
/// are dependended-upon.
27+
/// are depended-upon.
2828
/*@_spi(Testing)*/ public final class ModuleDependencyGraph: InternedStringTableHolder {
2929

3030
/// Supports finding nodes in two ways.
@@ -241,7 +241,7 @@ extension ModuleDependencyGraph {
241241
///
242242
/// - Parameter input: The file that has just been compiled
243243
/// - Returns: The input files that must be compiled now that `input` has been compiled.
244-
/// These may include inptus that do not need compilation because this build already compiled them.
244+
/// These may include inputs that do not need compilation because this build already compiled them.
245245
/// In case of an error, such as a missing entry in the `OutputFileMap`, nil is returned.
246246
@_spi(Testing) public func collectInputsRequiringCompilation(
247247
byCompiling input: SwiftSourceFile
@@ -283,7 +283,7 @@ extension ModuleDependencyGraph {
283283
///
284284
/// - Parameters:
285285
/// - fingerprintedExternalDependency: the dependency to trace
286-
/// - why: why the dependecy must be traced
286+
/// - why: why the dependency must be traced
287287
/// - Returns: any nodes that directly use (depend upon) that external dependency.
288288
/// As an optimization, only return the nodes that have not been already traced, because the traced nodes
289289
/// will have already been used to schedule jobs to run.
@@ -397,7 +397,7 @@ extension ModuleDependencyGraph {
397397
}
398398
}
399399

400-
/// Find the nodes *directly* invaliadated by some external dependency
400+
/// Find the nodes *directly* invalidated by some external dependency
401401
///
402402
/// This function does not do the transitive closure; that is left to the callers.
403403
func findNodesInvalidated(
@@ -618,7 +618,7 @@ extension ModuleDependencyGraph {
618618
/// - WARNING: You *must* increment the minor version number when making any
619619
/// changes to the underlying serialization format.
620620
///
621-
/// - Minor number 1: Don't serialize the `inputDepedencySourceMap`
621+
/// - Minor number 1: Don't serialize the `inputDependencySourceMap`
622622
/// - Minor number 2: Use `.swift` files instead of `.swiftdeps` in ``DependencySource``
623623
/// - Minor number 3: Use interned strings, including for fingerprints and use empty dependency source file for no DependencySource
624624
@_spi(Testing) public static let serializedGraphVersion = Version(1, 3, 0)
@@ -800,7 +800,7 @@ extension ModuleDependencyGraph {
800800

801801
/// Determine whether (deserialized) node was for a definition in a source file that is no longer part of the build.
802802
///
803-
/// If the priors were read from an invocation containing a subsuequently removed input,
803+
/// If the priors were read from an invocation containing a subsequently removed input,
804804
/// the nodes defining decls from that input must be culled.
805805
///
806806
/// - Parameter node: The (deserialized) node to test.

0 commit comments

Comments
 (0)