Skip to content

Commit 8420717

Browse files
committed
Fix all remaining spelling errors throughout the codebase
...to the best of my knowledge. I used cspell (`brew install cspell`) by running `cspell lint -u --words-only --no-progress "**/*" | sort > words.txt`, and then manually scanned through the list of around 2000 derived errors, skipping past technical terms or compound words that were valid but not in cspell's dictionaries. This also standardized the spelling of a handful of words to US English, and tweaked the grammar of the surrounding sentence structure in a few cases where obscure constructed or slang words were used. The majority of changes are in comments only, and most others in local variable names or test function names.
1 parent 4c97684 commit 8420717

File tree

131 files changed

+370
-370
lines changed

Some content is hidden

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

131 files changed

+370
-370
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-package-name SwiftBuild>
3737
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-upcoming-feature ExistentialAny>"
3838
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-upcoming-feature InternalImportsByDefault>")
3939

40-
# Prefer the static initialisation for the pluigns.
40+
# Prefer the static initialization for the plugins.
4141
add_compile_definitions(USE_STATIC_PLUGIN_INITIALIZATION)
4242

4343
find_package(ArgumentParser)

Sources/SWBApplePlatform/Specs/RealityAssetsCompilerSpec.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ package final class RealityAssetsCompilerSpec: GenericCompilerSpec, SpecIdentifi
4747
private func environmentBindings(_ cbc: CommandBuildContext, _ delegate: any TaskGenerationDelegate) -> EnvironmentBindings {
4848
var environmentBindings: [(String, String)] = environmentFromSpec(cbc, delegate)
4949

50-
// this is required to pass the funtional/integration tests in sandbox mode
50+
// this is required to pass the functional/integration tests in sandbox mode
5151
// because LLVM seems to create default.profraw files in the test directories
5252
environmentBindings.append(("LLVM_PROFILE_FILE", Path.null.str))
5353

@@ -168,7 +168,7 @@ package final class RealityAssetsCompilerSpec: GenericCompilerSpec, SpecIdentifi
168168
var inputs = [delegate.createDirectoryTreeNode(rkAssetsPath) as (any PlannedNode)]
169169
let outputs = [delegate.createNode(cbc.output) as (any PlannedNode)]
170170

171-
// need to add in o ptional --schema-file
171+
// need to add in optional --schema-file
172172
if let usdaSchemaPath {
173173
commandLine.append("--schema-file")
174174
commandLine.append(.path(usdaSchemaPath))
@@ -215,12 +215,12 @@ package final class RealityAssetsCompilerSpec: GenericCompilerSpec, SpecIdentifi
215215
}
216216

217217
public func constructTasks(_ cbc: CommandBuildContext, _ delegate: any TaskGenerationDelegate, moduleWithDependencies: ModuleWithDependencies) async {
218-
// Construct the realitool 'create-schema' preprocess swift -> schema .usda task.
218+
// Construct the realitytool 'create-schema' preprocess swift -> schema .usda task.
219219
await constructRealityAssetsCreateSchemaTasks(cbc, delegate, moduleWithDependencies: moduleWithDependencies)
220220
}
221221

222222
public override func constructTasks(_ cbc: CommandBuildContext, _ delegate: any TaskGenerationDelegate) async {
223-
// Construct the realitool 'compile' .rkassets [schema .usda] -> .reality task.
223+
// Construct the realitytool 'compile' .rkassets [schema .usda] -> .reality task.
224224
await constructRealityAssetCompilerTasks(cbc, delegate)
225225
}
226226
}

Sources/SWBBuildSystem/DependencyCycleFormatter.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ struct DependencyCycleFormatter {
502502
suffix = " because the scheme has implicit dependencies enabled and the Target '\(lastTargetsName)' references the file '\(filename)' in the build phase '\(buildPhase)'"
503503
case let .implicitBuildSettingLinkage(settingName, options)?:
504504
suffix = " because the scheme has implicit dependencies enabled and the Target '\(lastTargetsName)' defines the options '\(options.joined(separator: " "))' in the build setting '\(settingName)'"
505-
case let .impliedByTransitiveDependencyViaRemovedTargets(intermediateTargetName: intermdiateTargetName):
506-
suffix = " via its transitive dependency through '\(intermdiateTargetName)'"
505+
case let .impliedByTransitiveDependencyViaRemovedTargets(intermediateTargetName: intermediateTargetName):
506+
suffix = " via its transitive dependency through '\(intermediateTargetName)'"
507507
case nil:
508508
if !buildDescription.targetsBuildInParallel {
509509
suffix = " due to target order in a “Target Dependencies” build phase" + (buildRequest.schemeCommand != nil ? " or the scheme" : "")

Sources/SWBCore/BuildFileResolution.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extension BuildFileResolution {
4646
} else {
4747
// FIXME: A more reliable fallback might be to use GlobalProductPlan.productPathsToProducingTargets (where GlobalProductPlan conforms to TargetInfoProvider) if the absolute path of the product reference in this context were passed in.
4848
// If the reference is a product reference, then we want to use the settings for the configured target which produced it in this build, as it may have been built for a different platform and so we need to look up its information in the context of that platform.
49-
// FIXME: This is potentially janky since there's no inherent guarantee that this configured target exists in the build graph, but I think in practice it should work?
49+
// FIXME: This is potentially unsound since there's no inherent guarantee that this configured target exists in the build graph, but I think in practice it should work?
5050
let potentialSettings = globalTargetInfoProvider.getTargetSettings(ConfiguredTarget(parameters: parameters, target: productRefTarget))
5151
// If the `productRefTarget` needs specialization, we need to override `SDKROOT`.
5252
// FIXME: Ideally, we would be in a position where we can just use the right configured target here.

Sources/SWBCore/BuildRequestContext.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ extension BuildRequestContext {
149149

150150
let currentPlatformFilter = PlatformFilter(settings.globalScope)
151151

152-
// FIXME: It is a bit unfortunate that we need to compute all this for the `uniquingSuffix` behaviour.
152+
// FIXME: It is a bit unfortunate that we need to compute all this for the `uniquingSuffix` behavior.
153153
var sourceCodeFileToBuildableReference = [Path:Reference]()
154154
if let target = target.target as? StandardTarget {
155155
if let buildableReferences = try! target.sourcesBuildPhase?.buildFiles.compactMap({ (buildFile) -> Reference? in

Sources/SWBCore/BuildRuleCondition.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ public final class BuildRuleFileNameCondition: BuildRuleCondition {
9898
/// Evaluates the condition against the candidate, returning a `.normal` match priority level if its file name matches any of the patterns, or `.none` if there is no match.
9999
public func match(_ candidate: FileToBuild, _ scope: MacroEvaluationScope) -> BuildRuleConditionMatchPriority {
100100
for namePattern in namePatterns {
101-
let evalutedNamePattern = scope.evaluate(namePattern)
101+
let evaluatedNamePattern = scope.evaluate(namePattern)
102102
do {
103-
if try fnmatch(pattern: evalutedNamePattern, input: candidate.absolutePath.str) {
103+
if try fnmatch(pattern: evaluatedNamePattern, input: candidate.absolutePath.str) {
104104
return .normal
105105
}
106106
} catch {

Sources/SWBCore/DependencyResolution.swift

+10-10
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ struct SpecializationParameters: Hashable, CustomStringConvertible {
253253
else {
254254
overridingSdk = nil
255255
}
256-
// This seems like an unfortunate way to get from the SDK to its platform. But SettingsBuilder.computeBoundProperties() creates a scope to evalulate the PLATFORM_NAME defined in the SDK's default properties, so maybe there isn't a clearly better way.
256+
// This seems like an unfortunate way to get from the SDK to its platform. But SettingsBuilder.computeBoundProperties() creates a scope to evaluate the PLATFORM_NAME defined in the SDK's default properties, so maybe there isn't a clearly better way.
257257
if let overridingSdk, let overridingPlatform = workspaceContext.core.platformRegistry.platforms.filter({ $0.sdks.contains(where: { $0.canonicalName == overridingSdk.canonicalName }) }).first {
258258
platformName = overridingPlatform.name
259259
} else {
@@ -274,7 +274,7 @@ struct SpecializationParameters: Hashable, CustomStringConvertible {
274274
if let suffix = try? workspaceContext.sdkRegistry.lookup(sdk, activeRunDestination: parameters.activeRunDestination)?.canonicalNameSuffix, !suffix.isEmpty {
275275
sdkSuffix = suffix
276276
} else {
277-
// Treat a run destination that uses the public SDK as one that does not express an opinion about internalness instead of one that *requires* the public SDK.
277+
// Treat a run destination that uses the public SDK as one that does not express an opinion about internal-ness instead of one that *requires* the public SDK.
278278
sdkSuffix = nil
279279
}
280280
} else {
@@ -739,19 +739,19 @@ extension SpecializationParameters {
739739
let shouldImposePlatform = settings.enableTargetPlatformSpecialization
740740

741741
var imposedSupportedPlatforms: [String]?
742-
let specializatonIsSupported: Bool
742+
let specializationIsSupported: Bool
743743
if let specializedSupportedPlatforms = specialization.supportedPlatforms {
744744
// If `SDKROOT` is automatic, specialize supported platforms, but only if there is a non-empty intersection with the current value.
745-
specializatonIsSupported = !Set(supportedPlatforms).intersection(specializedSupportedPlatforms).isEmpty
746-
imposedSupportedPlatforms = specializatonIsSupported && shouldImposePlatform ? specialization.supportedPlatforms : nil
745+
specializationIsSupported = !Set(supportedPlatforms).intersection(specializedSupportedPlatforms).isEmpty
746+
imposedSupportedPlatforms = specializationIsSupported && shouldImposePlatform ? specialization.supportedPlatforms : nil
747747
} else {
748748
imposedSupportedPlatforms = nil
749-
specializatonIsSupported = false
749+
specializationIsSupported = false
750750
}
751751

752752
let imposedPlatform: Platform?
753753
if shouldImposePlatform {
754-
if specializatonIsSupported {
754+
if specializationIsSupported {
755755
imposedPlatform = specialization.platform
756756
} else {
757757
// There may be an existing `SUPPORTED_PLATFORMS` override in the parameters passed down by the client, so we want to make sure to provide our own, even if it might not be strictly necessary.
@@ -798,7 +798,7 @@ extension SpecializationParameters {
798798
// iOS targets get SUPPORTS_MACCATALYST by default, but SDKROOT=auto targets get an inconsistent view.
799799

800800
let isHostTool = settings.productType?.conformsTo(identifier: "com.apple.product-type.tool.host-build") == true
801-
if specializatonIsSupported && !isHostTool {
801+
if specializationIsSupported && !isHostTool {
802802
imposedSdkVariant = specialization.sdkVariant ?? imposedPlatform?.defaultSDKVariant
803803
} else {
804804
imposedSdkVariant = imposedPlatform?.defaultSDKVariant
@@ -814,7 +814,7 @@ extension SpecializationParameters {
814814
let initialFilteredSpecialization = SpecializationParameters(source: .synthesized, platform: imposedPlatform, sdkVariant: imposedSdkVariant, supportedPlatforms: imposedSupportedPlatforms, toolchain: nil, canonicalNameSuffix: nil)
815815
let initialSettings = buildRequestContext.getCachedSettings(initialFilteredSpecialization.imposed(on: parameters, workspaceContext: workspaceContext), target: forTarget)
816816
let specializationSDKOptions = initialSettings.globalScope.evaluate(BuiltinMacros.SPECIALIZATION_SDK_OPTIONS)
817-
if specializatonIsSupported {
817+
if specializationIsSupported {
818818
// If specialization explicitly requires public, but the target itself requires internal, emit an error.
819819
if let sdkSuffixFromSpecialization = specialization.canonicalNameSuffix, sdkSuffixFromSpecialization.isEmpty, !specializationSDKOptions.isEmpty {
820820
let specializationSuffix: String
@@ -869,7 +869,7 @@ extension SpecializationParameters {
869869

870870
// If we are imposing a platform, we also need to impose the toolchain, but skip it if the explicit setting already matches what we would impose.
871871
let imposedToolchain: [String]?
872-
if shouldImposePlatform && specializatonIsSupported {
872+
if shouldImposePlatform && specializationIsSupported {
873873
let specializationWithoutToolchainImposition = SpecializationParameters(source: .synthesized, platform: imposedPlatform, sdkVariant: imposedSdkVariant, supportedPlatforms: imposedSupportedPlatforms, toolchain: nil, canonicalNameSuffix: imposedCanonicalNameSuffix)
874874
let settingsWithToolchainImposition = buildRequestContext.getCachedSettings(specializationWithoutToolchainImposition.imposed(on: parameters, workspaceContext: workspaceContext), target: forTarget)
875875
let configuredToolchains = settingsWithToolchainImposition.toolchains.map({ $0.identifier })

Sources/SWBCore/LibSwiftDriver/LibSwiftDriver.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public protocol SwiftGlobalExplicitDependencyGraph : AnyObject {
4747
}
4848

4949
/// Keeps track of all of the explicit module dependency build jobs as depended on by individual target builds
50-
private struct GlobalExplicitDepependencyTracker {
50+
private struct GlobalExplicitDependencyTracker {
5151
/// Maps a SwiftDriverJob's UniqueID to its index in this store
5252
private var uniqueIndexMap: [Int: Int] = [:]
5353

@@ -120,7 +120,7 @@ public final class SwiftModuleDependencyGraph: SwiftGlobalExplicitDependencyGrap
120120

121121
private let registryQueue = SWBQueue(label: "SwiftModuleDependencyGraph", autoreleaseFrequency: .workItem)
122122
private var registry: [String: LibSwiftDriver] = [:]
123-
private var globalExplicitDepependencyTracker = GlobalExplicitDepependencyTracker()
123+
private var globalExplicitDependencyTracker = GlobalExplicitDependencyTracker()
124124

125125
public init() {}
126126

@@ -199,35 +199,35 @@ public final class SwiftModuleDependencyGraph: SwiftGlobalExplicitDependencyGrap
199199
public func addExplicitDependencyBuildJobs(_ jobs: [SwiftDriverJob], workingDirectory: Path,
200200
producerMap: inout [Path: LibSwiftDriver.JobKey]) throws -> Set<LibSwiftDriver.JobKey> {
201201
try registryQueue.blocking_sync {
202-
try globalExplicitDepependencyTracker.addExplicitDependencyBuildJobs(jobs, workingDirectory: workingDirectory, producerMap: &producerMap)
202+
try globalExplicitDependencyTracker.addExplicitDependencyBuildJobs(jobs, workingDirectory: workingDirectory, producerMap: &producerMap)
203203
}
204204
}
205205
public func getExplicitDependencyBuildJobs(for keys: [LibSwiftDriver.JobKey]) -> [LibSwiftDriver.PlannedBuild.PlannedSwiftDriverJob] {
206206
registryQueue.blocking_sync {
207-
globalExplicitDepependencyTracker.getExplicitDependencyBuildJobs(for: keys)
207+
globalExplicitDependencyTracker.getExplicitDependencyBuildJobs(for: keys)
208208
}
209209
}
210210
public func plannedExplicitDependencyBuildJob(for key: LibSwiftDriver.JobKey) -> LibSwiftDriver.PlannedBuild.PlannedSwiftDriverJob? {
211211
registryQueue.blocking_sync {
212-
globalExplicitDepependencyTracker.plannedExplicitDependencyBuildJob(for: key)
212+
globalExplicitDependencyTracker.plannedExplicitDependencyBuildJob(for: key)
213213
}
214214
}
215215
public func explicitDependencies(for job: LibSwiftDriver.PlannedBuild.PlannedSwiftDriverJob) -> [LibSwiftDriver.PlannedBuild.PlannedSwiftDriverJob] {
216216
registryQueue.blocking_sync {
217-
globalExplicitDepependencyTracker.explicitDependencies(for: job)
217+
globalExplicitDependencyTracker.explicitDependencies(for: job)
218218
}
219219
}
220220

221221
public var isEmpty: Bool {
222222
registryQueue.blocking_sync {
223-
globalExplicitDepependencyTracker.plannedExplicitDependencyJobs.isEmpty
223+
globalExplicitDependencyTracker.plannedExplicitDependencyJobs.isEmpty
224224
}
225225
}
226226

227227
public func generatePrecompiledModulesReport(in directory: Path, fs: any FSProxy) async throws -> String {
228228
// Collect DependencyInfo of every module built during the current build.
229229
var jobsByModuleID: [String: [SwiftDriverJob]] = [:]
230-
for job in globalExplicitDepependencyTracker.plannedExplicitDependencyJobs {
230+
for job in globalExplicitDependencyTracker.plannedExplicitDependencyJobs {
231231
let qualifier: String
232232
switch job.driverJob.ruleInfoType {
233233
case "CompileModuleFromInterface":

Sources/SWBCore/LibSwiftDriver/PlannedBuild.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public struct SwiftDriverJob: Serializable, CustomDebugStringConvertible {
8080
public let outputs: [Path]
8181
/// The command line to execute for this job
8282
public let commandLine: [SWBUtil.ByteString]
83-
/// A signature which uniquely idnetifies the job.
83+
/// A signature which uniquely identifies the job.
8484
public let signature: SWBUtil.ByteString
8585
/// Cache keys for the swift-frontend invocation (one key per output producing input)
8686
public let cacheKeys: [String]

Sources/SWBCore/MacroConfigFileLoader.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ final class MacroConfigFileLoader: Sendable {
5959
return loadSettingsFromConfig(data: data, path: path, namespace: namespace, searchPaths: searchPaths, filesSignature: filesSignature)
6060
}
6161

62-
/// Stores data about previosuly visited xcconfig files.
62+
/// Stores data about previously visited xcconfig files.
6363
fileprivate final class AncestorInclude {
6464
let path: Path
6565
let fs: any FSProxy

Sources/SWBCore/MacroEvaluationExtensions.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public extension PropertyListItem
4747
let parsedString = scope.table.namespace.parseString(string)
4848
let result = scope.evaluate(parsedString, lookup: preservingLookup)
4949
if anyReferencesWerePreserved {
50-
// If we preserved any refererences, then we need to convert the '\$\(((' in the result back to '$('.
50+
// If we preserved any references, then we need to convert the '\$\(((' in the result back to '$('.
5151
return result.replacingOccurrences(of: "\\$\\(((", with: "$(")
5252
}
5353
return result

Sources/SWBCore/OptimizationRemarks.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ extension Diagnostic {
276276
public init?(_ remark: OptimizationRemark, workingDirectory: Path) {
277277
guard let debugLoc = remark.debugLoc else { return nil } // skip if no debug location
278278
let path = Path(debugLoc.sourceFilePath)
279-
// Paths can be both asbolute and relative to the working directory.
279+
// Paths can be both absolute and relative to the working directory.
280280
let absolutePath = path.makeAbsolute(relativeTo: workingDirectory) ?? path
281281
self.init(behavior: .remark, location: .path(absolutePath, line: Int(debugLoc.sourceLine), column: Int(debugLoc.sourceColumn)), data: DiagnosticData(remark.message))
282282
}

Sources/SWBCore/PlatformFiltering.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extension PlatformFilter {
1818
let os = (!scope.evaluate(BuiltinMacros.__USE_PLATFORM_NAME_FOR_FILTERS) ? scope.evaluate(BuiltinMacros.SWIFT_PLATFORM_TARGET_PREFIX).nilIfEmpty : nil) ?? platformName
1919

2020
// We always want developers to set platform filters for a device platform *and* its simulator counterpart as a *single* inseparable unit.
21-
// To implicitly enforce this behaviour (and avoid the need for Swift Build clients to replicate it individually) for any target platform
21+
// To implicitly enforce this behavior (and avoid the need for Swift Build clients to replicate it individually) for any target platform
2222
// whose *environment* is "simulator" we simply omit it, effectively treating the target the same as the corresponding device platform.
2323
let targetTripleSuffix = scope.evaluate(BuiltinMacros.LLVM_TARGET_TRIPLE_SUFFIX)
2424
let env = targetTripleSuffix == "-simulator" ? "" : targetTripleSuffix

Sources/SWBCore/PlatformRegistry.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public final class PlatformRegistry {
298298
/// The list of all registered platforms, ordered by identifier.
299299
public private(set) var platforms = Array<Platform>()
300300

301-
/// The map of platforms by identifer.
301+
/// The map of platforms by identifier.
302302
@_spi(Testing) public private(set) var platformsByIdentifier = Dictionary<String, Platform>()
303303

304304
/// The map of platforms by name.

Sources/SWBCore/ProjectModel/BuildFile.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public final class BuildFile: ProjectModelItem {
7979
/// Whether to remove header from the file (directory), if copies.
8080
public let removeHeadersOnCopy: Bool
8181

82-
/// Whether to weak linkly, for linking build files.
82+
/// Whether to link weakly, for linking build files.
8383
public let shouldLinkWeakly: Bool
8484

8585
/// On Demand Resources asset tags

0 commit comments

Comments
 (0)