You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
re-introduce Package.Dependency.Requirement::upToNextMajor and ::upToNextMinor (#3922)
motivation: preserve source compatibility
changes:
* re-introduce Package.Dependency.Requirement::upToNextMajor and ::upToNextMinor
* mark Package.Dependency.Requirement::upToNextMajor and ::upToNextMinor as @_disfavoredOverload to disambiguate from the extension on Range
* add relevant API docs
* fix a few typos in docs
rdar://86041332
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Swift 5.6
16
16
17
17
*[#3641]
18
18
19
-
Soft deprecate `.package(name:, url:)` dependency syntax in favour of `.package(url:)`, given that an explicit `name` attribute is no longer needed for target depedendencies lookup.
19
+
Soft deprecate `.package(name:, url:)` dependency syntax in favor of `.package(url:)`, given that an explicit `name` attribute is no longer needed for target dependencies lookup.
20
20
21
21
*[#3641]
22
22
@@ -38,11 +38,11 @@ Swift 5.5
38
38
39
39
*[#3280]
40
40
41
-
A more intuitive `.product(name:, package:)` target depedendency syntax is now accepted, where `package` is the package identifier as defined by the package URL.
41
+
A more intuitive `.product(name:, package:)` target dependency syntax is now accepted, where `package` is the package identifier as defined by the package URL.
42
42
43
43
*[#3316]
44
44
45
-
Test targets can now link against executable targets as if they were libraries, so that they can test any data strutures or algorithms in them. All the code in the executable except for the main entry point itself is available to the unit test. Separate executables are still linked, and can be tested as a subprocess in the same way as before. This feature is available to tests defined in packages that have a tools version of `5.5` or newer.
45
+
Test targets can now link against executable targets as if they were libraries, so that they can test any data structures or algorithms in them. All the code in the executable except for the main entry point itself is available to the unit test. Separate executables are still linked, and can be tested as a subprocess in the same way as before. This feature is available to tests defined in packages that have a tools version of `5.5` or newer.
46
46
47
47
Swift 5.4
48
48
-----------
@@ -54,7 +54,7 @@ Swift 5.4
54
54
55
55
[SR-13566] The Swift tools version specification in each manifest file now accepts any combination of _horizontal_ whitespace characters surrounding `swift-tools-version`, if and only if the specified version ≥ `5.4`. For example, `//swift-tools-version: 5.4` and `// swift-tools-version: 5.4` are valid.
56
56
57
-
All [Unicode line terminators](https://www.unicode.org/reports/tr14/) are now recognised in `Package` manifests. This ensures correctness in parsing manifests that are edited and/or built on many non-Unix-like platforms that use ASCII or Unicode encodings.
57
+
All [Unicode line terminators](https://www.unicode.org/reports/tr14/) are now recognized in `Package` manifests. This ensures correctness in parsing manifests that are edited and/or built on many non-Unix-like platforms that use ASCII or Unicode encodings.
/// The version rule requires Swift packages to conform to semantic
196
192
/// versioning. To learn more about the semantic versioning standard,
197
193
/// visit [semver.org](https://semver.org).
198
-
///
199
-
/// Selecting the version requirement is the recommended way to add a package dependency. It allows you to create a balance between restricting changes and obtaining improvements and features.
200
-
///
201
-
/// **A branch-based requirement**
202
-
///
203
-
/// Select the name of the branch for your package dependency to follow.
204
-
/// Use branch-based dependencies when you're developing multiple packages
205
-
/// in tandem or when you don't want to publish versions of your package dependencies.
206
-
///
207
-
/// Note that packages which use branch-based dependency requirements
208
-
/// can't be added as dependencies to packages that use version-based dependency
209
-
/// requirements; you should remove branch-based dependency requirements
210
-
/// before publishing a version of your package.
211
-
///
212
-
/// **A commit-based requirement**
213
-
///
214
-
/// Select the commit hash for your package dependency to follow.
215
-
/// Choosing this option isn't recommended, and should be limited to
216
-
/// exceptional cases. While pinning your package dependency to a specific
217
-
/// commit ensures that the package dependency doesn't change and your
218
-
/// code remains stable, you don't receive any updates at all. If you worry about
219
-
/// the stability of a remote package, consider one of the more
220
-
/// restrictive options of the version-based requirement.
221
-
///
222
-
/// Note that packages which use commit-based dependency requirements
223
-
/// can't be added as dependencies to packages that use version-based
224
-
/// dependency requirements; you should remove commit-based dependency
225
-
/// requirements before publishing a version of your package.
226
194
@available(_PackageDescription, introduced:999)
227
195
publicenumRegistryRequirement{
228
196
case exact(Version)
@@ -250,3 +218,15 @@ extension Range {
250
218
return version ..<Version(version.major, version.minor +1,0)
0 commit comments