Skip to content

Commit a783689

Browse files
authored
Fixed some typos (#4170)
Fixed some typos.
1 parent 16e0e9c commit a783689

33 files changed

+63
-63
lines changed

Sources/Build/BuildOperationBuildSystemDelegateHandler.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,10 +764,10 @@ fileprivate struct CommandTaskTracker {
764764
private func progressText(of command: SPMLLBuild.Command, targetName: String?) -> String {
765765
// Transforms descriptions like "Linking ./.build/x86_64-apple-macosx/debug/foo" into "Linking foo".
766766
if let firstSpaceIndex = command.description.firstIndex(of: " "),
767-
let lastDirectorySeperatorIndex = command.description.lastIndex(of: "/")
767+
let lastDirectorySeparatorIndex = command.description.lastIndex(of: "/")
768768
{
769769
let action = command.description[..<firstSpaceIndex]
770-
let fileNameStartIndex = command.description.index(after: lastDirectorySeperatorIndex)
770+
let fileNameStartIndex = command.description.index(after: lastDirectorySeparatorIndex)
771771
let fileName = command.description[fileNameStartIndex...]
772772

773773
if let targetName = targetName {

Sources/Build/BuildPlan.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ public final class ClangTargetBuildDescription {
388388
}
389389
args += buildParameters.sanitizers.compileCFlags()
390390

391-
// Add agruments from declared build settings.
391+
// Add arguments from declared build settings.
392392
args += self.buildSettingsFlags()
393393

394394
if let resourceAccessorHeaderFile = self.resourceAccessorHeaderFile {
@@ -1855,7 +1855,7 @@ public class BuildPlan {
18551855

18561856
// Based on the debugging strategy, we either need to pass swiftmodule paths to the
18571857
// product or link in the wrapped module object. This is required for properly debugging
1858-
// Swift products. Debugging statergy is computed based on the current platform we're
1858+
// Swift products. Debugging strategy is computed based on the current platform we're
18591859
// building for and is nil for the release configuration.
18601860
switch buildParameters.debuggingStrategy {
18611861
case .swiftAST:
@@ -1908,7 +1908,7 @@ public class BuildPlan {
19081908
let nodes: [ResolvedTarget.Dependency] = product.targets.map { .target($0, conditions: []) }
19091909
let allTargets = try topologicalSort(nodes, successors: { dependency in
19101910
switch dependency {
1911-
// Include all the depenencies of a target.
1911+
// Include all the dependencies of a target.
19121912
case .target(let target, _):
19131913
return target.dependencies.filter { $0.satisfies(self.buildEnvironment) }
19141914

Sources/Build/LLBuildManifestBuilder.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ extension LLBuildManifestBuilder {
322322
// Consider an example SwiftPM package with two targets: target B, and target A, where A
323323
// depends on B:
324324
// SwiftPM will process targets in a topological order and “bubble-up” each target’s
325-
// inter-module dependency graph to its dependees. First, SwiftPM will process B, and be
325+
// inter-module dependency graph to its dependencies. First, SwiftPM will process B, and be
326326
// able to plan its full build because it does not have any target dependencies. Then the
327327
// driver is tasked with planning a build for A. SwiftPM will pass as input to the driver
328328
// the module dependency graph of its target’s dependencies, in this case, just the
@@ -655,7 +655,7 @@ extension LLBuildManifestBuilder {
655655
}
656656

657657
private func addModuleWrapCmd(_ target: SwiftTargetBuildDescription) throws {
658-
// Add commands to perform the module wrapping Swift modules when debugging statergy is `modulewrap`.
658+
// Add commands to perform the module wrapping Swift modules when debugging strategy is `modulewrap`.
659659
guard buildParameters.debuggingStrategy == .modulewrap else { return }
660660
var moduleWrapArgs = [
661661
target.buildParameters.toolchain.swiftCompiler.pathString,

Sources/Commands/WatchmanHelper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public final class WatchmanHelper {
6767
}
6868

6969
private func run(_ scriptPath: AbsolutePath) throws {
70-
// Construct the arugments.
70+
// Construct the arguments.
7171
var args = [String]()
7272
args += ["--settle", "2"]
7373
args += ["-p", "Package.swift", "Package.resolved"]

Sources/PackageCollectionsModel/PackageCollectionModel+v1.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ extension PackageCollectionModel.V1.ProductType: Codable {
383383
// MARK: - Signed package collection
384384

385385
extension PackageCollectionModel.V1 {
386-
/// A signed packge collection. The only difference between this and `Collection`
386+
/// A signed package collection. The only difference between this and `Collection`
387387
/// is the presence of `signature`.
388388
public struct SignedCollection: Equatable {
389389
/// The package collection

Sources/PackageCollectionsSigning/Key/ASN1/ASN1.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ extension ArraySlice where Element == UInt8 {
342342
let requiredBits = UInt.bitWidth - length.leadingZeroBitCount
343343
switch requiredBits {
344344
case 0 ... 7:
345-
// For 0 to 7 bits, the long form is unnacceptable and we require the short.
345+
// For 0 to 7 bits, the long form is unacceptable and we require the short.
346346
throw ASN1Error.unsupportedFieldLength
347347
case 8...:
348348
// For 8 or more bits, fieldLength should be the minimum required.

Sources/PackageDescription/Version.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public struct Version {
6262
/// - buildMetaDataIdentifiers: Build metadata that identifies a build.
6363
///
6464
/// - Precondition: `major >= 0 && minor >= 0 && patch >= 0`.
65-
/// - Precondition: `prereleaseIdentifiers` can conatin only ASCII alpha-numeric characters and "-".
66-
/// - Precondition: `buildMetaDataIdentifiers` can conatin only ASCII alpha-numeric characters and "-".
65+
/// - Precondition: `prereleaseIdentifiers` can contain only ASCII alpha-numeric characters and "-".
66+
/// - Precondition: `buildMetaDataIdentifiers` can contain only ASCII alpha-numeric characters and "-".
6767
public init(
6868
_ major: Int,
6969
_ minor: Int,

Sources/PackageGraph/PackageGraph+Loading.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ private class ResolvedBuilder<T> {
606606

607607
/// Construct the object with the accumulated data.
608608
///
609-
/// Note that once the object is constucted, future calls to
609+
/// Note that once the object is constructed, future calls to
610610
/// this method will return the same object.
611611
final func construct() throws -> T {
612612
if let constructedObject = _constructedObject {

Sources/PackageGraph/Pubgrub/PartialSolution.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import struct TSCUtility.Version
1818
public struct PartialSolution {
1919
var root: DependencyResolutionNode?
2020

21-
/// All known assigments.
21+
/// All known assignments.
2222
public private(set) var assignments: [Assignment]
2323

2424
/// All known decisions.
@@ -68,7 +68,7 @@ public struct PartialSolution {
6868
register(decision)
6969
}
7070

71-
/// Populates the _positive and _negative poperties with the assignment.
71+
/// Populates the _positive and _negative properties with the assignment.
7272
private mutating func register(_ assignment: Assignment) {
7373
let term = assignment.term
7474
let pkg = term.node

Sources/PackageGraph/Pubgrub/PubgrubDependencyResolver.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,15 @@ public struct PubgrubDependencyResolver {
310310
}
311311
} else if !overriddenPackages.keys.contains(dependency.package) {
312312
// Add the constraint if its not already present. This will ensure we don't
313-
// end up looping infinitely due to a cycle (which are diagnosed seperately).
313+
// end up looping infinitely due to a cycle (which are diagnosed separately).
314314
constraints.append(dependency)
315315
}
316316
}
317317
}
318318
}
319319

320320
// Process revision-based constraints in the second phase. Here we do the similar processing
321-
// as the first phase but we also ignore the constraints that are overriden due to
321+
// as the first phase but we also ignore the constraints that are overridden due to
322322
// presence of unversioned constraints.
323323
while let constraint = constraints.first(where: { $0.requirement.isRevision }) {
324324
guard case .revision(let revision) = constraint.requirement else {
@@ -331,7 +331,7 @@ public struct PubgrubDependencyResolver {
331331
switch overriddenPackages[package]?.version {
332332
case .excluded?, .version?:
333333
// These values are not possible.
334-
throw InternalError("Unexpected value for overriden package \(package) in \(overriddenPackages)")
334+
throw InternalError("Unexpected value for overridden package \(package) in \(overriddenPackages)")
335335
case .unversioned?:
336336
// This package is overridden by an unversioned package so we can ignore this constraint.
337337
continue
@@ -1187,7 +1187,7 @@ internal final class PubGrubPackageContainer {
11871187
return [try Incompatibility(Term(node, .exact(version)), root: root, cause: cause)]
11881188
}
11891189

1190-
// Skip if this package is overriden.
1190+
// Skip if this package is overridden.
11911191
if overriddenPackages.keys.contains(dep.package) {
11921192
continue
11931193
}

Sources/PackageGraph/ResolvedTarget.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public final class ResolvedTarget {
4242
}
4343
}
4444

45-
/// Returns the direct dependencies of the underlying dependency, accross the package graph.
45+
/// Returns the direct dependencies of the underlying dependency, across the package graph.
4646
public var dependencies: [ResolvedTarget.Dependency] {
4747
switch self {
4848
case .target(let target, _):
@@ -85,17 +85,17 @@ public final class ResolvedTarget {
8585
return dependencies.filter { $0.satisfies(environment) }
8686
}
8787

88-
/// Returns the recursive dependencies, accross the whole package-graph.
88+
/// Returns the recursive dependencies, across the whole package-graph.
8989
public func recursiveDependencies() throws -> [Dependency] {
9090
return try topologicalSort(self.dependencies) { $0.dependencies }
9191
}
9292

93-
/// Returns the recursive target dependencies, accross the whole package-graph.
93+
/// Returns the recursive target dependencies, across the whole package-graph.
9494
public func recursiveTargetDependencies() throws -> [ResolvedTarget] {
9595
return try topologicalSort(self.dependencies) { $0.dependencies }.compactMap { $0.target }
9696
}
9797

98-
/// Returns the recursive dependencies, accross the whole package-graph, which satisfy the input build environment,
98+
/// Returns the recursive dependencies, across the whole package-graph, which satisfy the input build environment,
9999
/// based on their conditions.
100100
/// - Parameters:
101101
/// - environment: The build environment to use to filter dependencies on.

Sources/PackageLoading/PkgConfig.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public struct PkgConfig {
128128
}
129129

130130
extension PkgConfig {
131-
/// Informations to track circular dependencies and other PkgConfig issues
131+
/// Information to track circular dependencies and other PkgConfig issues
132132
public class LoadingContext {
133133
public init() {
134134
pkgConfigStack = [String]()
@@ -218,8 +218,8 @@ internal struct PkgConfigParser {
218218

219219
/// Parses `Requires: ` string into array of dependencies.
220220
///
221-
/// The dependency string has seperator which can be (multiple) space or a
222-
/// comma. Additionally each there can be an optional version constaint to
221+
/// The dependency string has separator which can be (multiple) space or a
222+
/// comma. Additionally each there can be an optional version constraint to
223223
/// a dependency.
224224
private func parseDependencies(_ depString: String) throws -> [String] {
225225
let operators = ["=", "<", ">", "<=", ">="]
@@ -237,7 +237,7 @@ internal struct PkgConfigParser {
237237
var tokens = [String]()
238238
var token = ""
239239
for (idx, char) in depString.enumerated() {
240-
// Encountered a seperator, use the token.
240+
// Encountered a separator, use the token.
241241
if separators.contains(String(char)) {
242242
// If next character is a space skip.
243243
if let peeked = peek(idx: idx+1), peeked == " " { continue }

Sources/PackageLoading/PlatformRegistry.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import PackageModel
1313
/// A registry for available platforms.
1414
public final class PlatformRegistry {
1515

16-
/// The current registery is hardcoded and static so we can just use
16+
/// The current registry is hardcoded and static so we can just use
1717
/// a singleton for now.
1818
public static let `default`: PlatformRegistry = .init()
1919

Sources/PackageModel/Manifest.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public final class Manifest {
153153
/// Returns the targets required for a particular product filter.
154154
public func targetsRequired(for productFilter: ProductFilter) -> [TargetDescription] {
155155
#if ENABLE_TARGET_BASED_DEPENDENCY_RESOLUTION
156-
// If we have already calcualted it, returned the cached value.
156+
// If we have already calculated it, returned the cached value.
157157
if let targets = _requiredTargets[productFilter] {
158158
return targets
159159
} else {
@@ -328,7 +328,7 @@ public final class Manifest {
328328
///
329329
/// - Parameters:
330330
/// - targetDependency: The target dependency to register.
331-
/// - registry: The registry in which to record the assocation.
331+
/// - registry: The registry in which to record the association.
332332
/// - availablePackages: The set of available packages.
333333
private func register(
334334
targetDependency: TargetDescription.Dependency,
@@ -387,7 +387,7 @@ public final class Manifest {
387387
///
388388
/// - Parameters:
389389
/// - requiredPlugIn: The plug‐in to register.
390-
/// - registry: The registry in which to record the assocation.
390+
/// - registry: The registry in which to record the association.
391391
/// - availablePackages: The set of available packages.
392392
private func register(
393393
requiredPlugIn: TargetDescription.PluginUsage,

Sources/PackageModel/ManifestSourceGeneration.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,13 +560,13 @@ public struct SourceCodeFragment {
560560
/// A literal prefix to emit at the start of the source code fragment.
561561
var literal: String
562562

563-
/// The type of delimeters to use around the subfragments (if any).
563+
/// The type of delimiters to use around the subfragments (if any).
564564
var delimiters: Delimiters
565565

566566
/// Whether or not to emit newlines before the subfragments (if any).
567567
var multiline: Bool
568568

569-
/// Any subfragments; no delimeters are emitted if none.
569+
/// Any subfragments; no delimiters are emitted if none.
570570
var subnodes: [SourceCodeFragment]?
571571

572572
/// Type of delimiters to emit around any subfragments.

Sources/PackageModel/Product.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ public enum ProductType: Equatable, Hashable {
104104

105105
/// The products requested of a package.
106106
///
107-
/// Any product which matches the filter will be used for dependency resolution, whereas unrequested products will be ingored.
107+
/// Any product which matches the filter will be used for dependency resolution, whereas unrequested products will be ignored.
108108
///
109-
/// Requested products need not actually exist in the package. Under certain circumstances, the resolver may request names whose package of origin are unknown. The intended package will recognize and fullfill the request; packages that do not know what it is will simply ignore it.
109+
/// Requested products need not actually exist in the package. Under certain circumstances, the resolver may request names whose package of origin are unknown. The intended package will recognize and fulfill the request; packages that do not know what it is will simply ignore it.
110110
public enum ProductFilter: Equatable, Hashable {
111111

112112
/// All products, targets, and tests are requested.

Sources/PackagePlugin/PackageManagerProxy.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public struct PackageManager {
7575
}
7676

7777
/// Represents an overall purpose of the build, which affects such things
78-
/// asoptimization and generation of debug symbols.
78+
/// as optimization and generation of debug symbols.
7979
public enum BuildConfiguration: String {
8080
case debug, release
8181
}

Sources/SPMPackageEditor/ManifestRewriter.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ final class NewTargetWriter: SyntaxRewriter {
411411
)
412412

413413
let emptyArray = SyntaxFactory.makeArrayExpr(leftSquare: SyntaxFactory.makeLeftSquareBracketToken(), elements: SyntaxFactory.makeBlankArrayElementList(), rightSquare: SyntaxFactory.makeRightSquareBracketToken())
414-
let depenenciesArg = SyntaxFactory.makeFunctionCallArgument(
414+
let dependenciesArg = SyntaxFactory.makeFunctionCallArgument(
415415
label: SyntaxFactory.makeIdentifier("dependencies", leadingTrivia: leadingTriviaArgs),
416416
colon: SyntaxFactory.makeColonToken(trailingTrivia: .spaces(1)),
417417
expression: emptyArray,
@@ -422,7 +422,7 @@ final class NewTargetWriter: SyntaxRewriter {
422422
calledExpression: dotPackageExpr,
423423
leftParen: SyntaxFactory.makeLeftParenToken(),
424424
argumentList: SyntaxFactory.makeFunctionCallArgumentList([
425-
nameArg, depenenciesArg,
425+
nameArg, dependenciesArg,
426426
]),
427427
rightParen: SyntaxFactory.makeRightParenToken(),
428428
trailingClosure: nil

Sources/SPMTestSupport/InMemoryGitRepository.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public final class InMemoryGitRepository {
3535
/// A struct representing a revision state. Minimally it contains a hash identifier for the revision
3636
/// and the file system state.
3737
fileprivate struct RevisionState {
38-
/// The revision identifier hash. It should be unique amoung all the identifiers.
38+
/// The revision identifier hash. It should be unique among all the identifiers.
3939
var hash: RevisionIdentifier
4040

4141
/// The filesystem state contained in this revision.
@@ -141,7 +141,7 @@ public final class InMemoryGitRepository {
141141
throw InMemoryGitRepositoryError.unknownTag
142142
}
143143
// Point the head to the revision state of the tag.
144-
// It should be impossible that a tag exisits which doesnot have a state.
144+
// It should be impossible that a tag exists which does not have a state.
145145
try self.lock.withLock {
146146
guard let head = history[hash] else {
147147
throw InternalError("unknown hash \(hash)")

Sources/SourceControl/GitRepository.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ public enum GitProgressParser: FetchProgress {
10171017
case receivingObjects(progress: Double, currentObjects: Int, totalObjects: Int, downloadProgress: String?, downloadSpeed: String?)
10181018
case resolvingDeltas(progress: Double, currentObjects: Int, totalObjects: Int)
10191019

1020-
/// The pattern used to match git output. Caputre groups are labled from ?<i0> to ?<i19>.
1020+
/// The pattern used to match git output. Capture groups are labeled from ?<i0> to ?<i19>.
10211021
static let pattern = #"""
10221022
(?xi)
10231023
(?:

Sources/Workspace/DefaultPluginScriptRunner.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public struct DefaultPluginScriptRunner: PluginScriptRunner {
3535
self.enableSandbox = enableSandbox
3636
}
3737

38-
/// Public protocol function that starts compiling the plugin script to an exectutable. The tools version controls the availability of APIs in PackagePlugin, and should be set to the tools version of the package that defines the plugin (not of the target to which it is being applied). This function returns immediately and then calls the completion handler on the callbackq queue when compilation ends.
38+
/// Public protocol function that starts compiling the plugin script to an executable. The tools version controls the availability of APIs in PackagePlugin, and should be set to the tools version of the package that defines the plugin (not of the target to which it is being applied). This function returns immediately and then calls the completion handler on the callbackq queue when compilation ends.
3939
public func compilePluginScript(
4040
sources: Sources,
4141
toolsVersion: ToolsVersion,

Sources/XCBuildSupport/PIF.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public enum PIF {
242242
}
243243
}
244244

245-
/// Abstract base class for all items in the group hierarhcy.
245+
/// Abstract base class for all items in the group hierarchy.
246246
public class Reference: TypedObject {
247247
/// Determines the base path for a reference's relative path.
248248
public enum SourceTree: String, Codable {
@@ -1103,7 +1103,7 @@ public enum PIF {
11031103
}
11041104
}
11051105

1106-
/// Repesents a filetype recognized by the Xcode build system.
1106+
/// Represents a filetype recognized by the Xcode build system.
11071107
public struct XCBuildFileType: CaseIterable {
11081108
public static let xcdatamodeld: XCBuildFileType = XCBuildFileType(
11091109
fileType: "xcdatamodeld",

0 commit comments

Comments
 (0)