@@ -412,20 +412,18 @@ extension Package.Dependency {
412
412
413
413
/// Adds a package dependency that uses the exact version requirement.
414
414
///
415
- /// This is the recommended way to specify a remote package dependency.
416
- /// It allows you to specify the minimum version you require, allows updates that include bug fixes
417
- /// and backward-compatible feature updates, but requires you to explicitly update to a new major version of the dependency.
418
- /// This approach provides the maximum flexibility on which version to use,
419
- /// while making sure you don't update to a version with breaking changes,
420
- /// and helps to prevent conflicts in your dependency graph.
415
+ /// Specifying exact version requirements are not recommended as
416
+ /// they can cause conflicts in your dependency graph when multiple other packages depend on a package.
417
+ /// As Swift packages follow the semantic versioning convention,
418
+ /// think about specifying a version range instead.
421
419
///
422
420
/// The following example instruct the Swift Package Manager to use version `1.2.3`.
423
421
///
424
422
/// .package(url: "https://example.com/example-package.git", exact: "1.2.3"),
425
423
///
426
424
/// - Parameters:
427
425
/// - url: The valid Git URL of the package.
428
- /// - version: The minimum version requirement.
426
+ /// - version: The exact version of the dependency for this requirement.
429
427
@available ( _PackageDescription, introduced: 5.6 )
430
428
public static func package (
431
429
url: String ,
@@ -505,20 +503,18 @@ extension Package.Dependency {
505
503
506
504
/// Adds a package dependency that uses the exact version requirement.
507
505
///
508
- /// This is the recommended way to specify a remote package dependency.
509
- /// It allows you to specify the minimum version you require, allows updates that include bug fixes
510
- /// and backward-compatible feature updates, but requires you to explicitly update to a new major version of the dependency.
511
- /// This approach provides the maximum flexibility on which version to use,
512
- /// while making sure you don't update to a version with breaking changes,
513
- /// and helps to prevent conflicts in your dependency graph.
506
+ /// Specifying exact version requirements are not recommended as
507
+ /// they can cause conflicts in your dependency graph when multiple other packages depend on a package.
508
+ /// As Swift packages follow the semantic versioning convention,
509
+ /// think about specifying a version range instead.
514
510
///
515
511
/// The following example instruct the Swift Package Manager to use version `1.2.3`.
516
512
///
517
513
/// .package(id: "scope.name", exact: "1.2.3"),
518
514
///
519
515
/// - Parameters:
520
516
/// - id: The identity of the package.
521
- /// - version: The minimum version requirement.
517
+ /// - version: The exact version of the dependency for this requirement.
522
518
@available ( _PackageDescription, introduced: 5.7 )
523
519
public static func package (
524
520
id: String ,
0 commit comments