Skip to content

Commit 7a8f7f6

Browse files
zkiralyZsolt Kiraly
andauthored
[5.9] Editorial review changes of PackageDescription documentation. (#6471)
* Editorial review changes of PackageDescription documentation. * Resolved merge conflicts. --------- Co-authored-by: Zsolt Kiraly <[email protected]>
1 parent 76744ca commit 7a8f7f6

14 files changed

+134
-136
lines changed

Sources/PackageDescription/BuildSettings.swift

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
/// The build configuration such as debug or release.
13+
/// The build configuration, such as debug or release.
1414
public struct BuildConfiguration {
1515
/// The configuration of the build. Valid values are `debug` and `release`.
1616
let config: String
@@ -114,7 +114,7 @@ struct BuildSettingData {
114114
let condition: BuildSettingCondition?
115115
}
116116

117-
/// A C-language build setting.
117+
/// A C language build setting.
118118
public struct CSetting {
119119
/// The abstract build setting data.
120120
let data: BuildSettingData
@@ -135,7 +135,7 @@ public struct CSetting {
135135
///
136136
/// - Parameters:
137137
/// - path: The path of the directory that contains the headers. The path is relative to the target's directory.
138-
/// - condition: A condition that restricts the application of the build setting.
138+
/// - condition: A condition that restricts the use of the build setting.
139139
@available(_PackageDescription, introduced: 5.0)
140140
public static func headerSearchPath(_ path: String, _ condition: BuildSettingCondition? = nil) -> CSetting {
141141
return CSetting(name: "headerSearchPath", value: [path], condition: condition)
@@ -150,7 +150,7 @@ public struct CSetting {
150150
/// - Parameters:
151151
/// - name: The name of the macro.
152152
/// - value: The value of the macro.
153-
/// - condition: A condition that restricts the application of the build
153+
/// - condition: A condition that restricts the use of the build
154154
/// setting.
155155
@available(_PackageDescription, introduced: 5.0)
156156
public static func define(_ name: String, to value: String? = nil, _ condition: BuildSettingCondition? = nil) -> CSetting {
@@ -186,7 +186,7 @@ public struct CSetting {
186186

187187
/// A CXX-language build setting.
188188
public struct CXXSetting {
189-
/// The abstract build setting data.
189+
/// The data store for the CXX build setting.
190190
let data: BuildSettingData
191191

192192
private init(name: String, value: [String], condition: BuildSettingCondition?) {
@@ -205,6 +205,7 @@ public struct CXXSetting {
205205
///
206206
/// - Parameters:
207207
/// - path: The path of the directory that contains the headers. The path is
208+
/// relative to the target's directory.
208209
/// - condition: A condition that restricts the application of the build setting.
209210
@available(_PackageDescription, introduced: 5.0)
210211
public static func headerSearchPath(_ path: String, _ condition: BuildSettingCondition? = nil) -> CXXSetting {
@@ -255,7 +256,7 @@ public struct CXXSetting {
255256

256257
/// A Swift language build setting.
257258
public struct SwiftSetting {
258-
/// The abstract build setting data.
259+
/// The data store for the Swift build setting.
259260
let data: BuildSettingData
260261

261262
private init(name: String, value: [String], condition: BuildSettingCondition?) {
@@ -313,17 +314,17 @@ public struct SwiftSetting {
313314
/// Enable an upcoming feature with the given name.
314315
///
315316
/// An upcoming feature is one that is available in Swift as of a
316-
/// certain language version, but is not available by default in prior
317+
/// certain language version, but isn't available by default in prior
317318
/// language modes because it has some impact on source compatibility.
318319
///
319-
/// You can add multiple upcoming features to a given target, and can
320-
/// use in a target without affecting its dependencies. Targets will ignore any unknown
320+
/// You can add and use multiple upcoming features in a given target
321+
/// without affecting its dependencies. Targets will ignore any unknown
321322
/// upcoming features.
322323
///
323324
/// - Since: First available in PackageDescription 5.8.
324325
///
325326
/// - Parameters:
326-
/// - name: The name of the upcoming feature, e.g., ConciseMagicFile.
327+
/// - name: The name of the upcoming feature; for example, `ConciseMagicFile`.
327328
/// - condition: A condition that restricts the application of the build
328329
/// setting.
329330
@available(_PackageDescription, introduced: 5.8)
@@ -337,17 +338,17 @@ public struct SwiftSetting {
337338

338339
/// Enable an experimental feature with the given name.
339340
///
340-
/// An experimental feature is one that is in development, but
341+
/// An experimental feature is one that's in development, but
341342
/// is not yet available in Swift as a language feature.
342343
///
343-
/// You can add multiple experimental features to a given target, and can
344-
/// use in a target without affecting its dependencies. Targets will ignore any unknown
344+
/// You can add and use multiple experimental features in a given target
345+
/// without affecting its dependencies. Targets will ignore any unknown
345346
/// experimental features.
346347
///
347348
/// - Since: First available in PackageDescription 5.8.
348349
///
349350
/// - Parameters:
350-
/// - name: The name of the experimental feature, e.g., VariadicGenerics.
351+
/// - name: The name of the experimental feature; for example, `VariadicGenerics`.
351352
/// - condition: A condition that restricts the application of the build
352353
/// setting.
353354
@available(_PackageDescription, introduced: 5.8)
@@ -366,18 +367,18 @@ public struct SwiftSetting {
366367

367368
/// Enable Swift interoperability with a given language.
368369
///
369-
/// This is useful for enabling Swift/C++ interoperability for a given
370+
/// This is useful for enabling interoperability with Swift and C++ for a given
370371
/// target.
371372
///
372373
/// Enabling C++ interoperability mode might alter the way some existing
373-
/// C/Objective-C APIs are imported.
374+
/// C and Objective-C APIs are imported.
374375
///
375376
/// - Since: First available in PackageDescription 5.9.
376377
///
377378
/// - Parameters:
378-
/// - mode: The language mode, either C or Cxx.
379-
/// - version: If Cxx language mode is used, the version of Swift/C++
380-
/// interoperability, otherwise `nil`.
379+
/// - mode: The language mode, either C or CXX.
380+
/// - version: When using the CXX language mode, pass the version of Swift and C++
381+
/// interoperability; otherwise, `nil`.
381382
/// - condition: A condition that restricts the application of the build
382383
/// setting.
383384
@available(_PackageDescription, introduced: 5.9)
@@ -397,7 +398,7 @@ public struct SwiftSetting {
397398

398399
/// A linker build setting.
399400
public struct LinkerSetting {
400-
/// The abstract build setting data.
401+
/// The data store for the Linker setting.
401402
let data: BuildSettingData
402403

403404
private init(name: String, value: [String], condition: BuildSettingCondition?) {

Sources/PackageDescription/PackageDependency.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ extension Package {
1717
/// A package dependency consists of a Git URL to the source of the package,
1818
/// and a requirement for the version of the package.
1919
///
20-
/// Swift Package Manager performs a process called _dependency resolution_ to figure out
20+
/// Swift Package Manager performs a process called _dependency resolution_ to determine
2121
/// the exact version of the package dependencies that an app or other Swift
2222
/// package can use. The `Package.resolved` file records the results of the
2323
/// dependency resolution and lives in the top-level directory of a Swift
2424
/// package. If you add the Swift package as a package dependency to an app
2525
/// for an Apple platform, you can find the `Package.resolved` file inside
2626
/// your `.xcodeproj` or `.xcworkspace`.
2727
public class Dependency {
28-
/// The kind of dependency.
28+
/// The type of dependency.
2929
@available(_PackageDescription, introduced: 5.6)
3030
public enum Kind {
3131
/// A dependency located at the given path.
@@ -482,11 +482,11 @@ extension Package.Dependency {
482482
/// Adds a package dependency that uses the exact version requirement.
483483
///
484484
/// Specifying exact version requirements are not recommended as
485-
/// they can cause conflicts in your dependency graph when multiple other packages depend on a package.
485+
/// they can cause conflicts in your dependency graph when other packages depend on this package.
486486
/// As Swift packages follow the semantic versioning convention,
487487
/// think about specifying a version range instead.
488488
///
489-
/// The following example instruct the Swift Package Manager to use version `1.2.3`.
489+
/// The following example instructs the Swift Package Manager to use version `1.2.3`.
490490
///
491491
/// ```swift
492492
/// .package(url: "https://example.com/example-package.git", exact: "1.2.3"),
@@ -587,10 +587,10 @@ extension Package.Dependency {
587587
///
588588
/// Specifying exact version requirements are not recommended as
589589
/// they can cause conflicts in your dependency graph when multiple other packages depend on a package.
590-
/// As Swift packages follow the semantic versioning convention,
590+
/// Because Swift packages follow the semantic versioning convention,
591591
/// think about specifying a version range instead.
592592
///
593-
/// The following example instruct the Swift Package Manager to use version `1.2.3`.
593+
/// The following example instructs the Swift Package Manager to use version `1.2.3`.
594594
///
595595
/// ```swift
596596
/// .package(id: "scope.name", exact: "1.2.3"),

Sources/PackageDescription/PackageDescription.docc/Curation/Extensions/Product-Executable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
## Topics
44

5-
### Describing an Executable Product
5+
### Describing an executable product
66

77
- ``targets``

Sources/PackageDescription/PackageDescription.docc/Curation/Platform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- ``wasi``
1818
- ``windows``
1919

20-
### Type Methods
20+
### Type methods
2121

2222
- ``custom(_:)``
2323

Sources/PackageDescription/PackageDescription.docc/Curation/Plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
## Topics
44

5-
### Describing a Plugin Product
5+
### Describing a plug-in product
66

77
- ``targets``

Sources/PackageDescription/PackageDescription.docc/Curation/PluginPermission.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Topics
44

5-
### Create a Permission
5+
### Create a permission
66

77
- ``allowNetworkConnections(scope:reason:)``
88
- ``writeToPackageDirectory(reason:)``

Sources/PackageDescription/PackageDescription.docc/Curation/Product.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
- ``Product/plugin(name:targets:)``
1818
- ``Plugin``
1919

20-
### Naming the Product
20+
### Naming the product
2121

2222
- ``name``

Sources/PackageDescription/PackageDescription.docc/Curation/SupportedPlatforms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
- <doc:/documentation/PackageDescription/Platform/linux>
5050

51-
### Type Methods
51+
### Type methods
5252

5353
- ``custom(_:versionString:)``
5454

Sources/PackageDescription/PackageDescription.docc/Curation/Target-Dependency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- ``init(extendedGraphemeClusterLiteral:)``
1919
- ``init(unicodeScalarLiteral:)``
2020

21-
### Identifying Related Types
21+
### Identifying related types
2222

2323
- ``ExtendedGraphemeClusterLiteralType``
2424
- ``StringLiteralType``

Sources/PackageDescription/PackageDescription.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,10 @@ public final class Package {
315315
/// [RFC5646](https://tools.ietf.org/html/rfc5646).
316316
public struct LanguageTag: Hashable {
317317

318-
/// An IETF language tag.
318+
/// An IETF BCP 47 standard language tag.
319319
let tag: String
320320

321-
/// Creates a language tag from its IETF string representation.
321+
/// Creates a language tag from its [IETF BCP 47](https://datatracker.ietf.org/doc/html/rfc5646) string representation.
322322
///
323323
/// - Parameter tag: The string representation of an IETF language tag.
324324
private init(_ tag: String) {
@@ -377,15 +377,15 @@ public enum SystemPackageProvider {
377377
case brewItem([String])
378378
/// Packages installable by the apt-get package manager.
379379
case aptItem([String])
380-
/// Packages installable by the yum package manager.
380+
/// Packages installable by the Yellowdog Updated, Modified (YUM) package manager.
381381
@available(_PackageDescription, introduced: 5.3)
382382
case yumItem([String])
383383
/// Packages installable by the NuGet package manager.
384384
@available(_PackageDescription, introduced: 999.0)
385385
case nugetItem([String])
386386

387387
/// Creates a system package provider with a list of installable packages
388-
/// for users of the HomeBrew package manager on macOS.
388+
/// for people who use the HomeBrew package manager on macOS.
389389
///
390390
/// - Parameter packages: The list of package names.
391391
///
@@ -452,7 +452,7 @@ private func dumpPackageAtExit(_ package: Package, to handle: Int) {
452452
guard let dumpInfo else { return }
453453

454454
let hFile: HANDLE = HANDLE(bitPattern: dumpInfo.handle)!
455-
// NOTE: `_open_osfhandle` transfers ownership of the HANDLE to the file
455+
// NOTE: `_open_osfhandle` transfers ownership of the `HANDLE` to the file
456456
// descriptor. DO NOT invoke `CloseHandle` on `hFile`.
457457
let fd: CInt = _open_osfhandle(Int(bitPattern: hFile), _O_APPEND)
458458
// NOTE: `_fdopen` transfers ownership of the file descriptor to the

Sources/PackageDescription/PackageDescriptionSerializationConversion.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the Swift open source project
3+
// This source file is part of the Swift open source project.
44
//
5-
// Copyright (c) 2023 Apple Inc. and the Swift project authors
6-
// Licensed under Apache License v2.0 with Runtime Library Exception
5+
// Copyright (c) 2023 Apple Inc. and the Swift project authors.
6+
// 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

Sources/PackageDescription/Product.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ public class Product {
105105
}
106106
}
107107

108-
/// The plugin product of a Swift package.
108+
/// The plug-in product of a Swift package.
109109
public final class Plugin: Product {
110-
/// The name of the plugin target to vend as a product.
110+
/// The name of the plug-in target to vend as a product.
111111
public let targets: [String]
112112

113113
init(name: String, targets: [String]) {

Sources/PackageDescription/Resource.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public struct Resource {
3838
/// Defines the explicit type of localization for resources.
3939
public enum Localization: String {
4040

41-
/// A constant that represents default internationalization.
41+
/// A constant that represents default localization.
4242
case `default`
4343

4444
/// A constant that represents base internationalization.

0 commit comments

Comments
 (0)