Skip to content

Commit 911556a

Browse files
zkiralyZsolt Kiraly
andauthored
Part 1 of the PackageDescription DocC documentation update (#4276)
* Part 1 of the documentation update. * Corrected the docs for two `Package.Dependency` methods. * Changed the docs for the C language standards in response to PR comments. * Updated all the language standard identifier docs. * More responses to comments on the PR. * Responded to more comments. * Some light editing of the DocC documentation. * More small edits. * More minor edits. * Fixed a typo. * Removed unwanted blank-space. * Responding to Anders' notes. * I should not have touched this file, so I am reverting my changes there. * We can't link below the top level for legal reasons. * A small editorial change. Co-authored-by: Zsolt Kiraly <[email protected]>
1 parent 0147f71 commit 911556a

37 files changed

+1200
-451
lines changed

Sources/PackageDescription/BuildSettings.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,15 @@ public struct BuildSettingCondition: Encodable {
8181

8282
/// Creates a build setting condition.
8383
///
84-
/// - Parameters:
85-
/// - platforms: The applicable platforms for this build setting condition.
84+
/// - Parameter platforms: The applicable platforms for this build setting condition.
8685
@available(_PackageDescription, introduced: 5.7)
8786
public static func when(platforms: [Platform]) -> BuildSettingCondition {
8887
BuildSettingCondition(platforms: platforms, config: .none)
8988
}
9089

9190
/// Creates a build setting condition.
9291
///
93-
/// - Parameters:
94-
/// - configuration: The applicable build configuration for this build setting condition.
92+
/// - Parameter configuration: The applicable build configuration for this build setting condition.
9593
@available(_PackageDescription, introduced: 5.7)
9694
public static func when(configuration: BuildConfiguration) -> BuildSettingCondition {
9795
BuildSettingCondition(platforms: .none, config: configuration)

Sources/PackageDescription/Context.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
/// The context a Swift package is running in. This encapsulates states that are known at build-time.
14-
/// For example where in the file system the current package resides.
13+
/// The context information for a Swift package.
14+
///
15+
/// The context encapsulates states that are known when Swift Package Manager interprets the package manifest,
16+
/// for example the location in the file system where the current package resides.
1517
@available(_PackageDescription, introduced: 5.6)
1618
public struct Context {
1719
private static let model = try! ContextModel.decode()
1820

19-
/// The directory containing Package.swift.
21+
/// The directory that contains `Package.swift`.
2022
public static var packageDirectory : String {
2123
model.packageDirectory
2224
}

Sources/PackageDescription/LanguageStandardSettings.swift

Lines changed: 47 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10,161 +10,160 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
/// The supported C language standard to use for compiling C sources in the package.
14-
///
15-
/// Aliases are available for some C language standards. For example,
16-
/// use `c89`, `c90`, or `iso9899_1990` for the "ISO C 1990" standard.
17-
/// To learn more, read the [Clang Compiler User's Manual][1].
18-
///
19-
/// [1]: <https://clang.llvm.org/docs/UsersManual.html#differences-between-various-standard-modes>
13+
/// The supported C language standard you use to compile C sources in the
14+
/// package.
2015
public enum CLanguageStandard: String, Encodable {
2116

22-
/// ISO C 1990.
17+
/// The identifier for the ISO C 1990 language standard.
2318
case c89
2419

25-
/// ISO C 1990.
20+
/// The identifier for the ISO C 1990 language standard.
2621
case c90
2722

28-
/// ISO C 1999.
23+
/// The identifier for the ISO C 1999 language standard.
2924
case c99
3025

31-
/// ISO C 2011.
26+
/// The identifier for the ISO C 2011 language standard.
3227
case c11
3328

34-
/// ISO C 2017.
29+
/// The identifier for the ISO C 2017 language stadard.
3530
@available(_PackageDescription, introduced: 5.4)
3631
case c17
3732

38-
/// ISO C 2017.
33+
/// The identifier for the ISO C 2017 language standard.
3934
@available(_PackageDescription, introduced: 5.4)
4035
case c18
4136

42-
/// Working Draft for ISO C2x.
37+
/// The identifier for the ISO C2x draft language standard.
4338
@available(_PackageDescription, introduced: 5.4)
4439
case c2x
4540

46-
/// ISO C 1990 with GNU extensions.
41+
/// The identifier for the ISO C 1990 language standard with GNU extensions.
4742
case gnu89
4843

49-
/// ISO C 1990 with GNU extensions.
44+
/// The identifier for the ISO C 1990 language standard with GNU extensions.
5045
case gnu90
5146

52-
/// ISO C 1999 with GNU extensions.
47+
/// The identifier for the ISO C 1999 language standard with GNU extensions.
5348
case gnu99
5449

55-
/// ISO C 2011 with GNU extensions.
50+
/// The identifier for the ISO C 2011 language standard with GNU extensions.
5651
case gnu11
5752

58-
/// ISO C 2017 with GNU extensions.
53+
/// The identifier for the ISO C 2017 language standard with GNU extensions.
5954
@available(_PackageDescription, introduced: 5.4)
6055
case gnu17
6156

62-
/// ISO C 2017 with GNU extensions.
57+
/// The identifier for the ISO C 2017 language standard with GNU extensions.
6358
@available(_PackageDescription, introduced: 5.4)
6459
case gnu18
6560

66-
/// Working Draft for ISO C2x with GNU extensions.
61+
/// The identifier for the ISO C2x draft language standard with GNU extensions.
6762
@available(_PackageDescription, introduced: 5.4)
6863
case gnu2x
6964

70-
/// ISO C 1990.
65+
/// The identifier for the ISO C 1990 language standard.
7166
case iso9899_1990 = "iso9899:1990"
7267

73-
/// ISO C 1990 with amendment 1.
68+
/// The identifier for the ISO C 1990 language standard with amendment 1.
7469
case iso9899_199409 = "iso9899:199409"
7570

76-
/// ISO C 1999.
71+
/// The identifier for the ISO C 1999 language standard.
7772
case iso9899_1999 = "iso9899:1999"
7873

79-
/// ISO C 2011.
74+
/// The identifier for the ISO C 2011 language standard.
8075
case iso9899_2011 = "iso9899:2011"
8176

82-
/// ISO C 2017.
77+
/// The identifier for the ISO C 2017 language standard.
8378
@available(_PackageDescription, introduced: 5.4)
8479
case iso9899_2017 = "iso9899:2017"
8580

86-
/// ISO C 2017.
81+
/// The identifier for the ISO C 2017 language standard.
8782
@available(_PackageDescription, introduced: 5.4)
8883
case iso9899_2018 = "iso9899:2018"
8984
}
9085

91-
/// The supported C++ language standard to use for compiling C++ sources in the package.
86+
/// The supported C++ language standard you use to compile C++ sources in the
87+
/// package.
9288
///
9389
/// Aliases are available for some C++ language standards. For example,
9490
/// use `cxx98` or `cxx03` for the "ISO C++ 1998 with amendments" standard.
95-
/// To learn more, read the [C++ Support in Clang][1] status page.
96-
///
97-
/// [1]: <https://clang.llvm.org/cxx_status.html>
91+
/// To learn more, see [C++ Support in Clang](https://clang.llvm.org/cxx_status.html).
9892
public enum CXXLanguageStandard: String, Encodable {
9993

100-
/// ISO C++ 1998 with amendments.
94+
/// The identifier for the ISO C++ 1998 language standard with amendments.
10195
case cxx98 = "c++98"
10296

103-
/// ISO C++ 1998 with amendments.
97+
/// The identifier for the ISO C++ 1998 language standard with amendments.
10498
case cxx03 = "c++03"
10599

106-
/// ISO C++ 2011 with amendments.
100+
/// The identifier for the ISO C++ 2011 language standard with amendments.
107101
case cxx11 = "c++11"
108102

109-
/// ISO C++ 2014 with amendments.
103+
/// The identifier for the ISO C++ 2014 language standard with amendments.
110104
case cxx14 = "c++14"
111105

112-
/// ISO C++ 2017 with amendments.
106+
/// The identifier for the ISO C++ 2017 language standard with amendments.
113107
@available(_PackageDescription, introduced: 5.4)
114108
case cxx17 = "c++17"
115109

116-
/// ISO C++ 2017 with amendments.
110+
/// The identifier for the ISO C++ 2017 language standard with amendments.
117111
@available(_PackageDescription, introduced: 4, deprecated: 5.4, renamed: "cxx17")
118112
case cxx1z = "c++1z"
119113

120-
/// ISO C++ 2020 DIS.
114+
/// The identifier for the ISO C++ 2020 language standard.
121115
@available(_PackageDescription, introduced: 5.4)
122116
case cxx20 = "c++20"
123117

124-
/// Working draft for ISO C++ 2023 DIS.
118+
/// The identifier for the ISO C++ 2023 draft language standard.
125119
@available(_PackageDescription, introduced: 5.6)
126120
case cxx2b = "c++2b"
127121

128-
/// ISO C++ 1998 with amendments and GNU extensions.
122+
/// The identifier for the ISO C++ 1998 language standard with amendments and GNU extensions.
129123
case gnucxx98 = "gnu++98"
130124

131-
/// ISO C++ 1998 with amendments and GNU extensions.
125+
/// The identifier for the ISO C++ 1998 language standard with amendments and GNU extensions.
132126
case gnucxx03 = "gnu++03"
133127

134-
/// ISO C++ 2011 with amendments and GNU extensions.
128+
/// The identifier for the ISO C++ 2011 language standard with amendments and GNU extensions.
135129
case gnucxx11 = "gnu++11"
136130

137-
/// ISO C++ 2014 with amendments and GNU extensions.
131+
/// The identifier for the ISO C++ 2014 language standard with amendments and GNU extensions.
138132
case gnucxx14 = "gnu++14"
139133

140-
/// ISO C++ 2017 with amendments and GNU extensions.
134+
/// The identifier for the ISO C++ 2017 language standard with amendments and GNU extensions.
141135
@available(_PackageDescription, introduced: 5.4)
142136
case gnucxx17 = "gnu++17"
143137

144-
/// ISO C++ 2017 with amendments and GNU extensions.
138+
/// The identifier for the ISO C++ 2017 language standard with amendments and GNU extensions.
145139
@available(_PackageDescription, introduced: 4, deprecated: 5.4, renamed: "gnucxx17")
146140
case gnucxx1z = "gnu++1z"
147141

148-
/// ISO C++ 2020 DIS with GNU extensions.
142+
/// The identifier for the ISO C++ 2020 language standard with GNU extensions.
149143
@available(_PackageDescription, introduced: 5.4)
150144
case gnucxx20 = "gnu++20"
151145

152-
/// Working draft for ISO C++ 2023 DIS with GNU extensions.
146+
/// The identifier for the ISO C++ 2023 draft language standard with GNU extensions.
153147
@available(_PackageDescription, introduced: 5.6)
154148
case gnucxx2b = "gnu++2b"
155149
}
156150

157-
/// The version of the Swift language to use for compiling Swift sources in the package.
151+
/// The version of the Swift language you use to compile Swift sources in the
152+
/// package.
158153
public enum SwiftVersion {
154+
/// The identifier for the Swift 3 language version.
159155
@available(_PackageDescription, introduced: 4, obsoleted: 5)
160156
case v3
161157

158+
/// The identifier for the Swift 4 language version.
162159
@available(_PackageDescription, introduced: 4)
163160
case v4
164161

162+
/// The identifier for the Swift 4.2 language version.
165163
@available(_PackageDescription, introduced: 4)
166164
case v4_2
167165

166+
/// The identifier for the Swift 5 language version.
168167
@available(_PackageDescription, introduced: 5)
169168
case v5
170169

0 commit comments

Comments
 (0)